Skip to content
TheChatArchiveThe Chat Archive
gpt-3.5-turbo-0613· OpenAIAi2 WildChat-4.8M (AI2)

ok, I have adjusted by hand everything. check for wrongiries.:const xxxInput =…

  1. 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);

  2. 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);