mirror of
https://github.com/vladmandic/automatic
synced 2026-09-18 16:54:33 +02:00
Merge pull request #1258 from cool-bigdogs-tshirt/bigdog/unipc-inpainting-fix
fix unipc inpainting
This commit is contained in:
@@ -104,10 +104,10 @@ class VanillaStableDiffusionSampler:
|
||||
unconditional_conditioning = unconditional_conditioning[:, :cond.shape[1]]
|
||||
|
||||
if self.mask is not None:
|
||||
if shared.cmd_opts.use_ipex:
|
||||
img_orig = self.sampler.model.q_sample(self.init_latent, ts.type(torch.int64))
|
||||
else:
|
||||
img_orig = self.sampler.model.q_sample(self.init_latent, ts)
|
||||
encode_fn = self.sampler.model.q_sample
|
||||
if self.is_unipc:
|
||||
encode_fn = self.sampler.stochastic_encode
|
||||
img_orig = encode_fn(self.init_latent, ts)
|
||||
x = img_orig * self.mask + self.nmask * x
|
||||
|
||||
# Wrap the image conditioning back up since the DDIM code can accept the dict directly.
|
||||
|
||||
Reference in New Issue
Block a user