mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-12-30 13:51:27 -08:00
Added option to use unmasked conditioning image.
This commit is contained in:
parent
3e15f8e0f5
commit
f9549d1cbb
2 changed files with 6 additions and 1 deletions
|
|
@ -768,7 +768,11 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing):
|
|||
|
||||
# Create another latent image, this time with a masked version of the original input.
|
||||
conditioning_mask = conditioning_mask.to(image.device)
|
||||
conditioning_image = image * (1.0 - conditioning_mask)
|
||||
|
||||
conditioning_image = image
|
||||
if shared.opts.inpainting_mask_image:
|
||||
conditioning_image = conditioning_image * (1.0 - conditioning_mask)
|
||||
|
||||
conditioning_image = self.sd_model.get_first_stage_encoding(self.sd_model.encode_first_stage(conditioning_image))
|
||||
|
||||
# Create the concatenated conditioning tensor to be fed to `c_concat`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue