mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-01-31 18:52:58 +08:00
Make StableDiffusionProcessingImg2Img.mask_blur a property
Fixes breakage when mask_blur is set after construction. See https://github.com/Coyote-A/ultimate-upscale-for-automatic1111/issues/111#issuecomment-1652091424 Thanks to Алексей Трофимов and eunnone for reporting the issue.
This commit is contained in:
parent
25004d4eee
commit
a1825ee741
21
modules/processing.py
Normal file → Executable file
21
modules/processing.py
Normal file → Executable file
@ -1232,11 +1232,10 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing):
|
||||
self.image_mask = mask
|
||||
self.latent_mask = None
|
||||
self.mask_for_overlay = None
|
||||
if mask_blur is not None:
|
||||
mask_blur_x = mask_blur
|
||||
mask_blur_y = mask_blur
|
||||
self.mask_blur_x = mask_blur_x
|
||||
self.mask_blur_y = mask_blur_y
|
||||
if mask_blur is not None:
|
||||
self.mask_blur = mask_blur
|
||||
self.inpainting_fill = inpainting_fill
|
||||
self.inpaint_full_res = inpaint_full_res
|
||||
self.inpaint_full_res_padding = inpaint_full_res_padding
|
||||
@ -1246,6 +1245,22 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing):
|
||||
self.nmask = None
|
||||
self.image_conditioning = None
|
||||
|
||||
@property
|
||||
def mask_blur(self):
|
||||
if self.mask_blur_x == self.mask_blur_y:
|
||||
return self.mask_blur_x
|
||||
return None
|
||||
|
||||
@mask_blur.setter
|
||||
def mask_blur(self, value):
|
||||
self.mask_blur_x = value
|
||||
self.mask_blur_y = value
|
||||
|
||||
@mask_blur.deleter
|
||||
def mask_blur(self):
|
||||
del self.mask_blur_x
|
||||
del self.mask_blur_y
|
||||
|
||||
def init(self, all_prompts, all_seeds, all_subseeds):
|
||||
self.sampler = sd_samplers.create_sampler(self.sampler_name, self.sd_model)
|
||||
crop_region = None
|
||||
|
Loading…
Reference in New Issue
Block a user