fix exception related to the pix2pix
This commit is contained in:
parent
656437e0a5
commit
9c1c0da026
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue