mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-01-19 21:00:14 +08:00
Removed unnecessary condition check for masking
This commit is contained in:
parent
422981c85b
commit
4e2cc78e52
1
webui.py
1
webui.py
@ -1573,7 +1573,6 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing):
|
|||||||
self.mask = torch.asarray(1.0 - latmask).to(device).type(sd_model.dtype)
|
self.mask = torch.asarray(1.0 - latmask).to(device).type(sd_model.dtype)
|
||||||
self.nmask = torch.asarray(latmask).to(device).type(sd_model.dtype)
|
self.nmask = torch.asarray(latmask).to(device).type(sd_model.dtype)
|
||||||
|
|
||||||
if self.mask is not None:
|
|
||||||
if self.inpainting_fill == 2:
|
if self.inpainting_fill == 2:
|
||||||
self.init_latent = self.init_latent * self.mask + create_random_tensors(self.init_latent.shape[1:], [self.seed + x + 1 for x in range(self.init_latent.shape[0])]) * self.nmask
|
self.init_latent = self.init_latent * self.mask + create_random_tensors(self.init_latent.shape[1:], [self.seed + x + 1 for x in range(self.init_latent.shape[0])]) * self.nmask
|
||||||
elif self.inpainting_fill == 3:
|
elif self.inpainting_fill == 3:
|
||||||
|
Loading…
Reference in New Issue
Block a user