Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

[BlockInfo] Lumina (#11227)

Haomingfc4af8606880
diff --git a/comfy/ldm/lumina/model.py b/comfy/ldm/lumina/model.py
index 96cb37fa6..5628e2ba3 100644
--- a/comfy/ldm/lumina/model.py
+++ b/comfy/ldm/lumina/model.py
@@ -634,8 +634,11 @@ class NextDiT(nn.Module):
img, mask, img_size, cap_size, freqs_cis = self.patchify_and_embed(x, cap_feats, cap_mask, adaln_input, num_tokens, transformer_options=transformer_options)
freqs_cis = freqs_cis.to(img.device)
+ transformer_options["total_blocks"] = len(self.layers)
+ transformer_options["block_type"] = "double"
img_input = img
for i, layer in enumerate(self.layers):
+ transformer_options["block_index"] = i
img = layer(img, mask, freqs_cis, adaln_input, transformer_options=transformer_options)
if "double_block" in patches:
for p in patches["double_block"]: