1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-02 23:14:49 +08:00

Add a way to add patches to the input block.

This commit is contained in:
comfyanonymous
2023-11-14 00:08:12 -05:00
parent 8509bd58b4
commit 94cc718e9c
2 changed files with 8 additions and 0 deletions

View File

@@ -624,6 +624,11 @@ class UNetModel(nn.Module):
transformer_options["block"] = ("input", id)
h = forward_timestep_embed(module, h, emb, context, transformer_options)
h = apply_control(h, control, 'input')
if "input_block_patch" in transformer_patches:
patch = transformer_patches["input_block_patch"]
for p in patch:
h = p(h, transformer_options)
hs.append(h)
transformer_options["block"] = ("middle", 0)