feat: Add optional attention_mask input to LTXVAddGuide (CORE-220)#13965
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR adds an optional attention_mask input to LTXVAddGuide and threads it through LTXVAddGuide.execute into _append_guide_attention_entry. When provided, attention_mask is unsqueezed to a (1,1,F,H,W)-compatible pixel_mask per guide entry; otherwise pixel_mask is None. A comment clarifies guide entries are shallow-copied and pixel_mask is not mutated. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
LTXVAddGuidegets an optionalattention_maskinput, matching theattention_maskinput on Lightricks'sLTXAddVideoICLoRAGuideAdvancedcustom node from ComfyUI-LTXVideo. It is a pixel-space mask that controls per-region conditioning influence, multiplied by the node's existingstrength. With nothing connected, behavior is unchanged.The LTXV model code already reads each guide's
pixel_maskand applies it when weighting that guide's self-attention.Workflow for testing:
This example shows using a temporally fading attention mask to allow smoother transitions for first and last frame inputs when combined with IC-lora control.
(Uses ComfyUI-KJNodes for Fade Mask)
droz_LTX23_attention_mask_example_v1.json
Expected output:
ComfyUI_00126_.mp4
Input assets for test workflow:
input_assets.zip