ok, I have adjusted by hand everything. check for wrongiries.:const xxxInput =…
- User
ok, I have adjusted by hand everything. check for wrongiries.:const xxxInput = document.getElementById('xxx'); const yyyInput = document.getElementById('yyy'); const inputTextArea = document.getElementById('inputTextArea'); const inputTextArea2 = document.getElementById('inputTextArea2'); const CFG = parseInt(document.getElementById('CFG').value);
xxxInput.addEventListener('input', updateValue); yyyInput.addEventListener('input', updateValue);
function updateValue() { const roundedX = Math.floor(parseInt(xxxInput.value) / 8) * 8; const roundedY = Math.floor(parseInt(yyyInput.value) / 8) * 8;
xxxInput.value = roundedX; yyyInput.value = roundedY; }
const requestBody = { stride: '1', nerdcodes: genRanNum(), inputs: inputTextArea.value, parameters: { guidance_scale: CFG, negative_prompt: inputTextArea2.value, width: roundedX, height: roundedY } };
const requestPayload = JSON.stringify(requestBody);
- Assistant
const xxxInput = document.getElementById('xxx'); const yyyInput = document.getElementById('yyy'); const inputTextArea = document.getElementById('inputTextArea'); const inputTextArea2 = document.getElementById('inputTextArea2'); const CFG = parseInt(document.getElementById('CFG').value);
xxxInput.addEventListener('input', updateValue); yyyInput.addEventListener('input', updateValue);
function updateValue() { const roundedX = Math.floor(parseInt(xxxInput.value) / 8) * 8; const roundedY = Math.floor(parseInt(yyyInput.value) / 8) * 8;
xxxInput.value = roundedX; yyyInput.value = roundedY; }
const requestBody = { stride: '1', nerdcodes: genRanNum(), inputs: inputTextArea.value, parameters: { guidance_scale: CFG, negative_prompt: inputTextArea2.value, width: roundedX, height: roundedY } };
const requestPayload = JSON.stringify(requestBody);