fix exception related to the pix2pix

This commit is contained in:
AUTOMATIC1111 2023-11-06 11:17:36 +03:00
parent 656437e0a5
commit 9c1c0da026
1 changed files with 4 additions and 0 deletions

View File

@ -256,8 +256,12 @@ class StableDiffusionModelHijack:
self.layers = flatten(m) self.layers = flatten(m)
import modules.models.diffusion.ddpm_edit
if isinstance(m, ldm.models.diffusion.ddpm.LatentDiffusion): if isinstance(m, ldm.models.diffusion.ddpm.LatentDiffusion):
sd_unet.original_forward = ldm_original_forward sd_unet.original_forward = ldm_original_forward
elif isinstance(m, modules.models.diffusion.ddpm_edit.LatentDiffusion):
sd_unet.original_forward = ldm_original_forward
elif isinstance(m, sgm.models.diffusion.DiffusionEngine): elif isinstance(m, sgm.models.diffusion.DiffusionEngine):
sd_unet.original_forward = sgm_original_forward sd_unet.original_forward = sgm_original_forward
else: else: