From 67bd8d67c2968ae24188e4ceb620777e00b0ac5b Mon Sep 17 00:00:00 2001 From: Raphael Walker Date: Thu, 5 Dec 2024 15:45:56 +0100 Subject: [PATCH] enumerate --- comfy_extras/nodes_flux.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comfy_extras/nodes_flux.py b/comfy_extras/nodes_flux.py index fb4811f84..29b771438 100644 --- a/comfy_extras/nodes_flux.py +++ b/comfy_extras/nodes_flux.py @@ -116,7 +116,7 @@ class ReduxApplyWithAttnMask: # patch the model previous_patches = m.model_options["transformer_options"].get("patches_replace", {}).get("dit", {}) - for i, block in m.model.diffusion_model.double_blocks: + for i, block in enumerate(m.model.diffusion_model.double_blocks): # is there already a patch there? # if so, the attnwrapper can chain off it previous = previous_patches.get(("double_blocks", i), block)