Hi! I've been working extensively with LTX-2-MLX on Apple Silicon and fixed several significant bugs. Sharing them here in case they're useful for the project.
Fork with all fixes
https://github.com/altdotboy/LTX-2-MLX
Bug Fixes
1. Denoise mask broadcasting — breaks all videos longer than a few seconds
The denoise mask has shape (B, T) but the latent is (B, T, D). Direct multiplication causes incorrect broadcasting, and the error accumulates across timesteps on longer videos. Short clips (1-2s) mask the issue.
Fix: mx.expand_dims(mask, axis=-1) in noisers.py for both GaussianNoiser and DeterministicNoiser.
2. Audio VAE decoder parity (0.999 correlation with PyTorch)
Five fixes in the audio decoder:
- Causal axis drop in
Upsample2d (matches PyTorch CausalUpsample)
- Added
PixelNorm (norm_out) before final conv (matches _finalize_output)
- Fixed
per_channel_statistics weight path
- Fixed upsample conv weight path
- Vocoder: LeakyReLU slope corrected from
LRELU_SLOPE (0.1) to 0.01 before conv_post
- Vocoder: Native MLX dilation instead of manual kernel expansion
3. Spatial upscaler GroupNorm — grid/checkerboard artifacts
GroupNorm was normalizing per-frame (B*T, H, W, C) instead of across all frames jointly for 5D tensors. Added group_norm_5d() that normalizes over temporal+spatial dimensions together. Eliminates grid artifacts.
4. av_ca_timestep_scale_multiplier — speech audio nearly silent
Value was 1 instead of 1000, making audio-video cross-attention gate factor 0.001 instead of 1.0. Effectively zeroed cross-modal gates carrying speech information.
5. FPS mismatch — audio latent shape errors
Default fps was 24.0 but should be 25.0 (matching PyTorch frame_rate). Caused audio latent shape mismatch (34 vs 33 frames).
6. Audio weight loading
Added 'a2v' to include_audio filter so audio weights actually load.
New Features
- CFG guidance rescale (
rescale_noise_cfg) to prevent oversaturation
- Audio-to-video two-stage pipeline
- Retake pipeline
- Text+image-to-video HQ pipeline
- Channelwise audio noise normalization for duration-independent amplitude
- Gemma 3 text encoder improvements
Testing
All fixes tested on M5 128GB with Qwen3.5-35B. Audio decoder achieves 0.9994 correlation with PyTorch, vocoder 0.9989.
Happy to submit individual PRs for any of these if that's preferred. 🤙
Hi! I've been working extensively with LTX-2-MLX on Apple Silicon and fixed several significant bugs. Sharing them here in case they're useful for the project.
Fork with all fixes
https://github.com/altdotboy/LTX-2-MLX
Bug Fixes
1. Denoise mask broadcasting — breaks all videos longer than a few seconds
The denoise mask has shape
(B, T)but the latent is(B, T, D). Direct multiplication causes incorrect broadcasting, and the error accumulates across timesteps on longer videos. Short clips (1-2s) mask the issue.Fix:
mx.expand_dims(mask, axis=-1)innoisers.pyfor bothGaussianNoiserandDeterministicNoiser.2. Audio VAE decoder parity (0.999 correlation with PyTorch)
Five fixes in the audio decoder:
Upsample2d(matches PyTorchCausalUpsample)PixelNorm(norm_out) before final conv (matches_finalize_output)per_channel_statisticsweight pathLRELU_SLOPE(0.1) to 0.01 beforeconv_post3. Spatial upscaler GroupNorm — grid/checkerboard artifacts
GroupNormwas normalizing per-frame(B*T, H, W, C)instead of across all frames jointly for 5D tensors. Addedgroup_norm_5d()that normalizes over temporal+spatial dimensions together. Eliminates grid artifacts.4.
av_ca_timestep_scale_multiplier— speech audio nearly silentValue was 1 instead of 1000, making audio-video cross-attention gate factor 0.001 instead of 1.0. Effectively zeroed cross-modal gates carrying speech information.
5. FPS mismatch — audio latent shape errors
Default fps was 24.0 but should be 25.0 (matching PyTorch
frame_rate). Caused audio latent shape mismatch (34 vs 33 frames).6. Audio weight loading
Added
'a2v'toinclude_audiofilter so audio weights actually load.New Features
rescale_noise_cfg) to prevent oversaturationTesting
All fixes tested on M5 128GB with Qwen3.5-35B. Audio decoder achieves 0.9994 correlation with PyTorch, vocoder 0.9989.
Happy to submit individual PRs for any of these if that's preferred. 🤙