mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-04-26 09:18:59 +00:00
fix inpaint batch dim align #94
This commit is contained in:
@@ -56,7 +56,7 @@ class PreprocessorInpaintOnly(PreprocessorInpaint):
|
||||
unet = process.sd_model.forge_objects.unet.clone()
|
||||
|
||||
def pre_cfg(model, c, uc, x, timestep, model_options):
|
||||
noisy_latent = latent_image.to(x) + timestep.to(x) * torch.randn_like(latent_image).to(x)
|
||||
noisy_latent = latent_image.to(x) + timestep[:, None, None, None].to(x) * torch.randn_like(latent_image).to(x)
|
||||
x = x * latent_mask.to(x) + noisy_latent.to(x) * (1.0 - latent_mask.to(x))
|
||||
return model, c, uc, x, timestep, model_options
|
||||
|
||||
|
||||
Reference in New Issue
Block a user