From 4750e58757dfd52855164c97ad962669b320e0a3 Mon Sep 17 00:00:00 2001 From: MoonRide303 Date: Thu, 21 Sep 2023 09:34:39 +0200 Subject: [PATCH] Updated patched functions (round #2) --- modules/patch.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/patch.py b/modules/patch.py index b5b25f1793..c2661d6135 100644 --- a/modules/patch.py +++ b/modules/patch.py @@ -341,7 +341,9 @@ def patched_unet_forward(self, x, timesteps=None, context=None, y=None, control= transformer_options["block"] = ("middle", 0) h = forward_timestep_embed(self.middle_block, h, emb, context, transformer_options) if control is not None and 'middle' in control and len(control['middle']) > 0: - h += control['middle'].pop() + ctrl = control['middle'].pop() + if ctrl is not None: + h += ctrl for id, module in enumerate(self.output_blocks): transformer_options["block"] = ("output", id) @@ -431,8 +433,8 @@ def vae_bf16_upsample_forward(self, x): def patch_all(): - comfy.model_management.vae_dtype = vae_dtype_patched - comfy.ldm.modules.diffusionmodules.model.Upsample.forward = vae_bf16_upsample_forward +# comfy.model_management.vae_dtype = vae_dtype_patched +# comfy.ldm.modules.diffusionmodules.model.Upsample.forward = vae_bf16_upsample_forward # comfy.sd1_clip.SD1ClipModel.forward = patched_SD1ClipModel_forward