means that when calling the forward() method of the LTXVModel (or a similar model in the LTX 2B pipeline), the required argument attention_mask was not provided. This is a common issue when working with transformer-based models, which often require both input_ids and attention_mask as inputs to properly handle padding and focus attention on valid tokens only[2][4][5][7][9].
Why This Happens in ComfyUI with LTX 2B
The LTX 2B model (and similar transformer models) expects an attention_mask argument in its forward() method.
If you load or connect the model in ComfyUI without ensuring that the node or workflow provides this argument, you will get this error[1].
This can happen if you are not using the correct model node, or if your workflow is missing a step that generates or passes the attention_mask.
How to Fix
1. Use the Correct Model Node/Configurator
In ComfyUI-LTXVideo, you must use the model resulting from the configurator node (not just loading the model weights directly)[1].
The configurator node is responsible for preparing and wiring up all required arguments, including attention_mask.
2. Check Your Workflow
Ensure your workflow includes a node or step that generates the attention_mask and passes it to the model.
If you are manually wiring nodes, double-check that the output from your tokenizer or text encoder includes both input_ids and attention_mask, and that both are passed to the model node[1][2][7][9].
3. Change the CLIP Model (if applicable)
Some users found that switching the CLIP model in the Clip panel to a compatible version (e.g., t5xxl_fp8_e4m3fn.safetensors) resolved the issue, as some CLIP models may not output the required mask in the expected format[1].
4. Update ComfyUI and Extensions
Make sure you are using the latest version of ComfyUI and the LTXVideo extension, as updates may fix workflow compatibility and argument passing issues[1][6].
5. Example Fix in Python (for reference)
If you are scripting or debugging, ensure your model call looks like this:
Otherwise, you will get the missing argument error[4][5].
Summary Table
Step
What to Check/Do
Use configurator node
Always use the model output from the configurator node in ComfyUI-LTXVideo
Workflow wiring
Ensure both input_ids and attention_mask are passed to the model node
CLIP model compatibility
Try switching to a different CLIP model if issues persist
Update software
Make sure ComfyUI and extensions are up to date
Manual scripting
Always provide attention_mask when calling the model’s forward() method
Community Feedback
> "Probably you are not using the model resulting from the configurator node."
> — michaellightricks, ComfyUI-LTXVideo GitHub[1]
> "I just change the Clip in the Clip panel to t5xxl_fp8_e4m3fn.safetensors."
> — zopi4k, ComfyUI-LTXVideo GitHub[1]
Conclusion
This error is caused by missing the required attention_mask argument when calling the LTX 2B model in ComfyUI. To fix it, ensure you use the correct workflow nodes (especially the configurator node), pass all required arguments, and consider updating your CLIP model or ComfyUI installation if needed[1][4][5].
User
did t5 base or evn t5flan work? t5xxl is way too big
Assistant
Yes, smaller T5 models like T5-base and T5-Flan can work as text encoders in ComfyUI and with LTX 2B video models, but with some caveats:
T5-base and T5-Flan are supported by ComfyUI’s T5 loader nodes. The LoadT5Model node in ComfyUI allows you to specify any pre-trained T5 model, including T5-base, T5-small, T5-large, and T5-Flan variants, not just the massive T5-XXL[3][1]. This means you can use much smaller models that require far less VRAM and system memory.
You may need to adjust your workflow to ensure the model path and tokenizer are set correctly, but the node is designed to handle device allocation and configuration automatically[3].
Prompt length and quality: Smaller T5 models (like base or Flan-T5-base) will support shorter prompts and may not capture as much nuance or context as T5-XXL, but they are much more resource-friendly and still functional for many creative tasks[1][3].
LTX 2B and T5 compatibility: The LTX 2B model is designed to work with T5-family encoders, and there is no strict requirement to use only T5-XXL. The official guides and ComfyUI nodes mention T5-XXL as an example, but you can substitute a smaller T5 model if you prefer[8][3][1].
How to Use T5-base or T5-Flan in ComfyUI
Install the T5 model:
Use the ComfyUI Model Manager or the LoadT5Model node to select and load your desired T5 variant (e.g., t5-base, flan-t5-base, etc.)[3][1].
Configure the node:
Enter the model name or path (e.g., google/t5-base or google/flan-t5-base) in the node’s parameters.
Connect as text encoder:
Use the output of this node as the text encoder input for your LTX 2B workflow, just as you would with T5-XXL[3][8].
Proceed with your workflow:
The rest of your workflow remains unchanged.
Summary Table
Model Variant
VRAM/Resource Use
Prompt Length
Quality/Context
Works in ComfyUI-LTX?
T5-base
Low
Shorter
Good
Yes
T5-Flan-base
Low
Shorter
Good
Yes
T5-XXL
Very High
Long
Best
Yes
Key Points
You do NOT have to use T5-XXL. Smaller T5 models are supported and work, though with some trade-offs in prompt length and subtlety[3][1][8].
T5-Flan models (e.g., flan-t5-base) are also compatible and can be loaded the same way[3].
If you run into errors, double-check the model path and ensure the tokenizer is correctly set up in the node[3].
In summary:
You can use T5-base or T5-Flan as your text encoder for LTX 2B in ComfyUI. They are much smaller and more efficient than T5-XXL, and the ComfyUI nodes are designed to support them out of the box[3][1][8].