Merge pull request #330 from madrang/use_cpu_fix

Update use_cpu on Redo and Double Size to move renders to/from cpu and gpu after starting.
This commit is contained in:
cmdr2 2022-10-17 15:22:13 +05:30 committed by GitHub
commit e533bc0847
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -449,7 +449,10 @@ function getStartNewTaskHandler(reqBody, imageItemElem, mode) {
switch (mode) {
case 'img2img':
case 'img2img_X2':
newTaskRequest.reqBody = Object.assign({}, reqBody, { num_outputs: 1 })
newTaskRequest.reqBody = Object.assign({}, reqBody, {
num_outputs: 1,
use_cpu: useCPUField.checked,
})
if (!newTaskRequest.reqBody.init_image || mode === 'img2img_X2') {
newTaskRequest.reqBody.sampler = 'ddim'
newTaskRequest.reqBody.prompt_strength = '0.5'