mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-06-03 16:45:55 +02:00
Fix a bug where the inpainting mask wasn't resized to the image size when using the WebUI/v3.5 backend. Thanks @AvidGameFan for their help in investigating and fixing this!
This commit is contained in:
parent
a1fb9bc65c
commit
a8b1bbe441
@ -195,7 +195,7 @@ def generate_images(
|
||||
cmd["init_images"] = [init_image]
|
||||
cmd["denoising_strength"] = prompt_strength
|
||||
if init_image_mask:
|
||||
cmd["mask"] = init_image_mask
|
||||
cmd["mask"] = init_image_mask if isinstance(init_image_mask, str) else img_to_base64_str(init_image_mask)
|
||||
cmd["include_init_images"] = True
|
||||
cmd["inpainting_fill"] = 1
|
||||
cmd["initial_noise_multiplier"] = 1
|
||||
|
@ -240,6 +240,10 @@ def generate_images_internal(
|
||||
if req.init_image is not None and int(req.num_inference_steps * req.prompt_strength) == 0:
|
||||
req.prompt_strength = 1 / req.num_inference_steps if req.num_inference_steps > 0 else 1
|
||||
|
||||
if req.init_image_mask:
|
||||
req.init_image_mask = get_image(req.init_image_mask)
|
||||
req.init_image_mask = resize_img(req.init_image_mask.convert("RGB"), req.width, req.height, clamp_to_8=True)
|
||||
|
||||
backend.set_options(
|
||||
context,
|
||||
output_format=output_format.output_format,
|
||||
|
Loading…
x
Reference in New Issue
Block a user