LTX 2.5 renders all-black video on MPS unless --use-split-cross-attention is set
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 158
Description
# LTX 2.5 renders all-black video on MPS unless `--use-split-cross-attention` is set
## Summary
On Apple Silicon (MPS), LTX 2.5 text-to-video produces uniformly black frames with the
default attention backend. `--use-split-cross-attention` fixes it completely.
`--use-quad-cross-attention` does **not** — output is black again.
Since both flags are attention-memory optimizations but only one avoids the failure, this
does not look like an OOM or a general attention-memory problem. It points at a specific
numerical path, most likely bf16 handling inside the non-split attention implementation.
## Environment
| | |
|---|---|
| ComfyUI | 0.33.0 (commit `76135e55`, 2026-08-20) |
| Install | manual (venv), not Desktop |
| OS | macOS 26.5.2 (build 25F84) |
| Hardware | Apple M1 Max, 32 GPU cores, 64 GB unified memory |
| PyTorch | 2.12.0 |
| Python | 3.14.7 |
| Custom nodes | none (stock `custom_nodes/` only) |
All LTXV nodes come from core `comfy_extras/nodes_lt.py` and
`comfy_extras/nodes_lt_upsampler.py`. ComfyUI-LTXVideo is **not** installed.
## Models
```
ltx-2.5-22b-distilled-transformer-bf16.safetensors
ltx-2.5-video-vae-bf16.safetensors
ltx-2.5-audio-vae-bf16.safetensors
gemma4-12b-with-proj-ltx-2.5-bf16.safetensors (text encoder)
ltx-2.5-latent-spatial-upscaler-x2-bf16-1.0.safetensors
ltx-2.5-latent-temporal-upscaler-x2-bf16-1.0.safetensors
```
## Reproduction
Stock "Text to Video (LTX-2.5)" workflow, sampler `euler`, 1280x736, duration 5s @ 24fps.
```bash
# black output
python main.py --lowvram --cache-none
# black output
python main.py --use-quad-cross-attention --lowvram --cache-none
# correct output
python main.py --use-split-cross-attention --lowvram --cache-none
```
## Symptom
The run completes with no error, no NaN warning, and a normal-looking progress bar.
The resulting video is uniformly black:
```
$ ffmpeg -i output/video/LTX_2.5_t2v_00001.mp4 -vf signalstats -f null - 2>&1 \
| grep -o "YAVG:[0-9.]*" | tail -5
YAVG:16.0
YAVG:16.0
YAVG:16.0
```
`YAVG` and `YMAX` both pin at 16 (limited-range black) for every frame.
## What this is not
- **Not the VAE decode.** `--cpu-vae` does not change the result. The latents reaching
the decoder are already bad.
- **Not out of memory.** The run completes normally. Memory pressure stays green and
no allocation failure is raised.
- **Not attention memory generally.** This is the useful part: `--use-quad-cross-attention`
is also an attention-memory optimization, and it reproduces the black output. Only the
*split* implementation avoids it.
Taken together, the failure appears to be numerical (NaN/inf propagating through the
transformer) rather than resource-related, and specific to the attention implementation
selected rather than to how much memory attention uses.
## Workaround
```bash
python main.py --use-split-cross-attention
```
This has been reliable across many runs at 49, 121 and 241 frames.
## Possibly related
There is an existing PR against Lightricks/ComfyUI-LTXVideo (#345) that switches the Gemma
text encoder from bf16 to fp16 specifically because "MPS doesn't fully support bfloat16."
That is a different repo and a different code path from this report — I am not running it —
but if the root cause here is also incomplete bf16 support on MPS, the two may share an
underlying mechanism.
Contributor guide
Research direction
Start in comfy_extras/nodes_lt.py and comfy_extras/nodes_lt_upsampler.py, then trace the attention backend used by the LTX 2.5 workflow. Reproduce on MPS with the default, quad, and split attention commands from the report and compare the resulting latents or output. Done means the default and quad paths no longer produce uniformly black video while the documented workflow still completes normally.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100