Skip to content

Commit fc4af86

Browse files
[BlockInfo] Lumina (#11227)
* block info * device * Make tensor int again --------- Co-authored-by: Jedrzej Kosinski <[email protected]>
1 parent 41bcf06 commit fc4af86

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

comfy/ldm/lumina/model.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,8 +634,11 @@ def _forward(self, x, timesteps, context, num_tokens, attention_mask=None, trans
634634
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)
635635
freqs_cis = freqs_cis.to(img.device)
636636

637+
transformer_options["total_blocks"] = len(self.layers)
638+
transformer_options["block_type"] = "double"
637639
img_input = img
638640
for i, layer in enumerate(self.layers):
641+
transformer_options["block_index"] = i
639642
img = layer(img, mask, freqs_cis, adaln_input, transformer_options=transformer_options)
640643
if "double_block" in patches:
641644
for p in patches["double_block"]:

0 commit comments

Comments
 (0)