mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2024-11-26 10:16:12 +01:00
Fix upscaling when a source image is set (#593)
* Fix upscaling when a source image is set If you have an image selected (img2img) then clicking Upscale on another unrelated image, the image for img2img is used and you get something very unexpected. * Fix for img2img and mask gens
This commit is contained in:
parent
0f96688a54
commit
bd10a850fa
@ -387,9 +387,28 @@ function enqueueImageVariationTask(req, img, reqDiff) {
|
||||
}
|
||||
|
||||
function onUpscaleClick(req, img) {
|
||||
enqueueImageVariationTask(req, img, {
|
||||
use_upscale: upscaleModelField.value
|
||||
})
|
||||
if (IMAGE_REGEX.test(req.init_image) && IMAGE_REGEX.test(req.mask)) {
|
||||
enqueueImageVariationTask(req, img, {
|
||||
use_upscale: upscaleModelField.value,
|
||||
init_image: req.init_image,
|
||||
mask: req.mask
|
||||
})
|
||||
}
|
||||
else if (IMAGE_REGEX.test(req.init_image)) {
|
||||
enqueueImageVariationTask(req, img, {
|
||||
use_upscale: upscaleModelField.value,
|
||||
init_image: req.init_image,
|
||||
mask: undefined
|
||||
})
|
||||
}
|
||||
else
|
||||
{
|
||||
enqueueImageVariationTask(req, img, {
|
||||
use_upscale: upscaleModelField.value,
|
||||
init_image: undefined,
|
||||
mask: undefined
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function onFixFacesClick(req, img) {
|
||||
|
Loading…
Reference in New Issue
Block a user