If the prompt encodes successfully and sampling immediately fails with Tensors must have same number of dimensions: got 4 and 3, check the exact text encoder filename first. The generic Gemma 4 12B weight from Comfy-Org passes the loading stage in ComfyUI while missing the projection that LTX-2.5 expects. For the workflow tested here, select gemma4-12b-with-proj-ltx-2.5-comfy-int8-convrot.safetensors from Lightricks. That configuration rendered clips in our September test. On 5 November we reproduced the failure with the generic encoder.
This page is the English version of our Spanish field notes, with the same measurements.
What happened in the RTX 3090 test
On 5 November 2026 we ran the T2V workflow from our LTX-2.5 test and changed only the text encoder.
| Item | Value |
|---|---|
| GPU and RAM | RTX 3090 24 GB, 32 GB system RAM |
| ComfyUI | 0.43.2 (commit 423cbd20), PyTorch 2.10.0+cu130, core nodes only |
| Loader | CLIPLoader with type ltxv |
| Encoder under test | gemma4_12b_int8_convrot.safetensors, 12,055,234,634 bytes |
| Transformer and VAE | ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors, ltx-2.5-video-vae-bf16.safetensors |
| Clip | 960×544, 121 frames, 24 fps, eight distilled sigma steps, CFG 1 |
| Prompt | A red kite flies over a green hill on a windy afternoon, static camera. |
All three files were downloaded from Hugging Face and their SHA-256 matched the hash on each model page, so a corrupted download was ruled out before looking at the graph.
Step 1: the encoder on its own
With a minimal graph (CLIPLoader → CLIPTextEncode), the Comfy-Org file loaded with no errors or warnings and encoded the prompt in 133 seconds. The VRAM peak, read with nvidia-smi, was 14.1 GB including roughly 2 GB used by the desktop. At this point everything looks fine.
The log shows the catch. ComfyUI identified the file as a generic Gemma 4 model (Gemma4TEModel_) and returned the hidden states of all its layers, a 4D tensor. In ComfyUI 0.43.2, a Gemma 4 12B checkpoint is only treated as an LTX-2.5 encoder when it contains the key text_embedding_projection.video_aggregate_embed.weight. The Comfy-Org file does not have it.
Step 2: the full workflow
The graph ran up to sampling and stopped inside SamplerCustomAdvanced before the first step:
RuntimeError: Tensors must have same number of dimensions: got 4 and 3
File "comfy/ldm/lightricks/embeddings_connector.py", line 290, in forward
The LTX-2.5 connector expects conditioning that has already been projected (three dimensions) and received raw hidden states (four dimensions). The timings in the log were: VAE loaded after about 16 seconds, positive and negative prompts encoded in about 120 seconds, transformer ready at 148 seconds, error at 150 seconds. There was no out-of-memory condition and no video output.
What we did not test that day: a rerun with the with-proj file. That combination is the one our September LTX-2.5 test used for eight clips, but it was not executed again on 5 November.
Select the weight with the projection included
| File | Repository | Size on disk | Works with LTX-2.5? |
|---|---|---|---|
gemma4-12b-with-proj-ltx-2.5-comfy-int8-convrot.safetensors | Lightricks/LTX-2.5, text_encoders/ | 15.4 GB | Yes, it includes the projection |
gemma4-12b-with-proj-ltx-2.5-bf16.safetensors | Lightricks/LTX-2.5, text_encoders/ | 26.3 GB | BF16 version of the above; not tested by us |
gemma4_12b_int8_convrot.safetensors | Comfy-Org/gemma-4, text_encoders/ | 12.1 GB | No: it loads, then sampling fails |
We did not find a standalone LTX-2.5 projection file that could be paired with the Comfy-Org encoder. The LTX-2.5 repositories we checked only ship it inside the with-proj files. Download the LTX-specific encoder from the Lightricks text encoder directory.
If you already downloaded the Comfy-Org file for LTX-2.5, do not rename it. Keep it for workflows that request exactly that filename and add the Lightricks file next to it.
Where to put it and how to check the download
Both files belong in the text encoder folder:
ComfyUI/
└── models/
└── text_encoders/
└── gemma4-12b-with-proj-ltx-2.5-comfy-int8-convrot.safetensors
If you keep models on another drive through extra_model_paths.yaml, confirm that the ComfyUI process you are running reads that path instead of copying the file to several places. Then select the complete filename in the loader; two names that start the same way are easy to swap in the dropdown.
Before blaming the graph, rule out an incomplete download. Compute the hash and compare it with the SHA-256 shown on the Hugging Face file page:
sha256sum ComfyUI/models/text_encoders/gemma4-12b-with-proj-ltx-2.5-comfy-int8-convrot.safetensors
If it does not match, delete the file and download it again. A saved HTML page with a .safetensors extension, or a truncated file, still shows up in the dropdown.
Match the symptom to the wrong file
| Symptom | Likely cause | What to do |
|---|---|---|
| The file is missing from the loader dropdown | Wrong folder, or a different ComfyUI install from the one running | Check the path and extra_model_paths.yaml |
Loads and encodes, then sampling fails with got 4 and 3 | Encoder without the LTX projection, such as the Comfy-Org file | Switch to the Lightricks with-proj file |
| The loader node is red | The package that provides the node is missing or failed to import | Fix the node first; see the import failed guide |
| CUDA reports exhausted memory | Depends on the stage: loading, encoding or sampling | Note which node stops; in our test the encoder and transformer were not resident at the same time |
The same got 4 and 3 message was already reported with LTX 2.3 when Gemma was loaded without its projection file. If you see it with any LTX version, suspect the encoder before touching samplers, schedulers or resolution.
If your exception explicitly reports exhausted CUDA memory rather than a tensor-rank mismatch, use the ComfyUI out-of-memory guide to find the stage where memory runs out.
Next steps in ComfyUI
Getting started
FAQ
- Does ComfyUI warn me when the Gemma file is the wrong one?
- No. In our test the generic Comfy-Org file loaded with no warning and encoded the prompt in 133 seconds. The failure only appeared at the first sampling step. A loader that accepts a file does not prove the file suits the model downstream.
- Why did prompt encoding finish without an error?
- The generic Gemma file is a working text encoder, so it can turn the prompt into hidden states. The mismatch appears later, when the LTX-2.5 connector expects projected 3D conditioning and receives raw 4D hidden states from every layer.
- Are the 12.1 GB and 15.4 GB file sizes the VRAM I need?
- They are sizes on disk. With the generic encoder alone, the peak we measured was 14.1 GB including about 2 GB used by the desktop. In the earlier LTX-2.5 test with the projection-equipped encoder, the encoder and the transformer were loaded one after the other rather than at the same time.
- Can I use a smaller Gemma 4 or a chat GGUF instead?
- Not with LTX-2.5 as it ships today. ComfyUI 0.43.2 only treats a Gemma 4 12B file as an LTX-2.5 encoder when it contains the projection tensor, and the LTX-2.5 repositories we checked only distribute that projection inside the with-proj files.
- Has the projection-equipped encoder been verified as the fix?
- That configuration is the one our September LTX-2.5 test used to render eight clips. On 5 November we only reproduced the failure with the generic file and did not repeat the successful run, so treat the fix as documented rather than re-measured on that date.
- Should I rename the generic file to the with-proj filename?
- No. Renaming does not add the missing tensor; the loader would detect the same generic model and the sampler would fail the same way. Download the Lightricks file and keep the Comfy-Org one for workflows that ask for it by name.