LTX-Desktop icon indicating copy to clipboard operation
LTX-Desktop copied to clipboard

Apple M2 Max: 5s I2V works, 10s produces colored noise on LTX 2.5 and 2.3 (Desktop 1.3.1)

Open maximilianmuschen-dot opened this issue 1 month ago • 2 comments

Summary

Local image-to-video generation produces recognizable output at 5 seconds, but 10-second requests repeatedly finish successfully and save playable MP4 files containing predominantly colored noise. The inspected logs show no corresponding out-of-memory exception or traceback. The corruption is in the saved MP4, not just the preview.

Environment

  • LTX Desktop 1.3.1
  • macOS 26.6.2
  • Apple M2 Max, 64 GB unified memory
  • PyTorch 2.11.0; mps-sdpa 0.2.0
  • MPS, bfloat16, streaming model loading
  • Bundled zero-copy mpsgraph_zc backend active
  • Model files and outputs on the internal APFS data volume

Reproduction

  1. Open Image to Video, select LTX 2.5 Fast, and supply a start image (front view of a car). An optional rear-view end image was used in some runs.
  2. Set 540p, Auto aspect ratio (actual output 896x576), 24 fps, and fixed seed 2147483647.
  3. Use an English automotive prompt describing acceleration past the camera, a following camera pan, and a departing rear view. Keep the prompt and inputs unchanged between duration comparisons.
  4. Generate 5s (121 frames), then 10s (241 frames).

Expected: Coherent video at both durations. Actual: 5s produces recognizable vehicle imagery. At 10s, sampled frames around 1s, 5s, and 9s show strong colored noise. The initial conditioning frame can remain normal. A prior 10s attempt with another seed also produced noise.

Completed comparisons

Configuration Observed result
2.5 Fast, 5s, start/end images, cloud text encoding, fast decode Recognizable vehicle video
2.5 Fast, 10s, otherwise matched to the 5s run Strong colored noise
2.5 Fast, 10s, local text encoding Strong colored noise
2.5 Fast, 10s, start image only Strong colored noise
2.5 Fast, 10s, start image only, fast decode OFF, downloaded DiffVAE Strong colored noise; about 38 min total
2.3 Fast (2.3-22b-distilled-1.1), 10s, start/end images, cloud text encoding Strong colored noise; about 19.6 min total

The matched 5s/10s comparison used the same seed, prompt, resolution, fps and input assets. The model-version comparison necessarily used each model's own encoder/decoder. Local auto-enhancement was skipped when the separate local enhancer was unavailable.

Diagnostics

  • The 2.3 run completed with 241 frames and a saved MP4 after 1173.67s.
  • The slow-decoder 2.5 run completed after 2284.28s and loaded the actual alternate VAE checkpoint. Its log reported DiffVAE eager tiled SDPA fallback.
  • Representative transformer phases reported about 7–12 GiB driver allocations, with the logged MPS limit at 51.84 GiB. The slow-decoder run also stayed below that limit in observed samples.
  • Limited isolated synthetic attention comparisons against CPU float32 produced finite values and small errors at tested sequence sizes. This does not establish correctness of the full pipeline.
  • Finder reported roughly 259 GB available while df reported much less immediately free space. This discrepancy was not resolved; disk shortage is not established as the cause.
  • Related: #165, closed as fixed in 1.3.0. This case persists in 1.3.1 and with LTX 2.3.

Questions

Is there a known length-dependent corruption path on M2/MPS shared by these pipelines? What diagnostic best distinguishes corrupted denoising latents from decoder corruption? A recommended instrumented build or supported way to save intermediate latents would help avoid further lengthy blind rerenders.

Sanitized log excerpts are attached. Usernames, local paths, generation/asset identifiers, credentials, and the customer images/prompt have been omitted. No application source code was modified; tests used normal UI settings and official model downloads.

sanitized-logs.txt

maximilianmuschen-dot avatar Oct 24 '26 20:10 maximilianmuschen-dot

Repro attempt on Apple M5 Max (128 GB): the 10 s clip is clean here.

Setup: macOS 26.6.2, torch 2.11.0, mps-sdpa 0.2.0, commit 801c3633 (branch fix/mps-sdpa-long-sequence, adds the benchmark and the opt-in LTX_MPS_DIAG=1 diagnostic).

Kernel micro-test (bench_mps_sdpa_long_seq.py)

All rows ok, all finite, 0.0% bad rows.

  • Default sweep (8 and 32 heads, 3,906 to 24,000 tokens): path mpsgraph_zc. This includes 32 heads at 8,064 tokens (2.08 billion score elements) and 15,624 tokens (7.8 billion, 3.64x 2^31).
  • --heads 32 --tokens 8064 15624 --logit-std 8: path mpsgraph_zc, ok. Error vs reference is larger (0.008 / 0.0125), as expected with large logits.
  • --heads 32 --tokens 8064 15624 --kv-tokens 1024 --mask: path stock_fallback (mask), ok.

Real generation

Image to Video, LTX 2.5 Fast, 540p, aspect Auto (896x576), 24 fps, seed 2147483647, one start image, no end image. Only the duration changed.

Run Time Frames
5 s (121 frames) 80 s coherent picture
10 s (241 frames) 187 s coherent picture at 1 s, 5 s and 9 s, no noise

[mps-diag] showed first_nonfinite_block=none and nonfinite=0 on every call.

  • Stage 1: 8 calls, tokens 2016 (5 s) vs 3906 (10 s).
  • Stage 2: 3 calls, tokens 8064 (5 s) vs 15624 (10 s).
  • Output absmax stayed between 7.9 and 12.1 in both runs. Per-block absmax was near-identical between 5 s and 10 s (b0 about 390 to 430, b40 about 10,800 to 13,800, b47 about 2,600 to 3,300). No jumps.

Conclusion

Nothing failed on the M5 Max. The fused attention kernel is correct at 8,064 and 15,624 tokens, and no transformer block produced NaN, Inf or an absmax spike. The bug is therefore probably specific to the M2 Max or its macOS version. I'm not guessing beyond that.

Caveat: the start image was a cropped cartoon test image (no front-facing photo available), and the runs went through the queued /api/generations/image-to-video route on a headless backend.

Could you share the [mps-diag] lines from a 10 s run on your M2 Max (start the app with LTX_MPS_DIAG=1), plus your macOS version? That would show where the values first go bad.

bureyburey avatar Nov 05 '26 08:11 bureyburey

please check if this issue still occurs in v1.3.2

bureyburey avatar Nov 11 '26 10:11 bureyburey