Problem
After fixing Hugging Face config metadata parsing, LTX-2 generation reaches transformer loading but fails before any frames are generated.
The latest local Mini Studio job failed with:
ValueError: Received 1680 parameters not in model:
audio_caption_projection.linear_1.bias,
audio_caption_projection.linear_1.weight,
...
transformer_blocks.0.attn1.to_out.0.weight,
transformer_blocks.0.audio_ff.net.0.proj.weight,
...
Reproduction
- Start the local Web UI:
mlx_video.webui --server-port 7861
- Submit an LTX-2 image-to-video job using
Lightricks/LTX-2, distilled pipeline, 512x512, 97 frames.
- Inspect the job log under
outputs/logs/<job-id>.log.
The Web UI itself stays alive, but the generation subprocess exits with status 1 and no MP4 appears under outputs/videos/.
Root Cause
LTXModel.sanitize() already contains the key conversions needed by the local MLX module names:
.linear_1. -> .linear1.
.linear_2. -> .linear2.
.to_out.0. -> .to_out.
.ff.net.0.proj. -> .ff.proj_in.
.ff.net.2. -> .ff.proj_out.
- audio FF equivalents
However, those conversions currently run only when the incoming checkpoint keys have the raw model.diffusion_model. prefix.
The Hugging Face Lightricks/LTX-2 transformer safetensors are already unprefixed, but still use Diffusers-style submodule names. Because sanitize() returns unprefixed weights unchanged, load_weights(strict=True) sees 1680 unexpected parameters.
Expected Behavior
Unprefixed Diffusers-style transformer keys should be normalized before strict MLX loading, just like prefixed raw checkpoint keys.
Local Evidence
- Web UI:
http://127.0.0.1:7861/ returns 200 OK.
- Latest failed job:
0ebf34d8d38a.
- Latest log:
outputs/logs/0ebf34d8d38a.log.
- No generated MP4 files under
outputs/videos/.
Problem
After fixing Hugging Face config metadata parsing, LTX-2 generation reaches transformer loading but fails before any frames are generated.
The latest local Mini Studio job failed with:
Reproduction
Lightricks/LTX-2, distilled pipeline, 512x512, 97 frames.outputs/logs/<job-id>.log.The Web UI itself stays alive, but the generation subprocess exits with status 1 and no MP4 appears under
outputs/videos/.Root Cause
LTXModel.sanitize()already contains the key conversions needed by the local MLX module names:.linear_1.->.linear1..linear_2.->.linear2..to_out.0.->.to_out..ff.net.0.proj.->.ff.proj_in..ff.net.2.->.ff.proj_out.However, those conversions currently run only when the incoming checkpoint keys have the raw
model.diffusion_model.prefix.The Hugging Face
Lightricks/LTX-2transformer safetensors are already unprefixed, but still use Diffusers-style submodule names. Becausesanitize()returns unprefixed weights unchanged,load_weights(strict=True)sees 1680 unexpected parameters.Expected Behavior
Unprefixed Diffusers-style transformer keys should be normalized before strict MLX loading, just like prefixed raw checkpoint keys.
Local Evidence
http://127.0.0.1:7861/returns 200 OK.0ebf34d8d38a.outputs/logs/0ebf34d8d38a.log.outputs/videos/.