Skip to content

LTX-2 transformer weights fail strict loading with Diffusers-style keys #32

Description

@andyelka-creator

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

  1. Start the local Web UI:
mlx_video.webui --server-port 7861
  1. Submit an LTX-2 image-to-video job using Lightricks/LTX-2, distilled pipeline, 512x512, 97 frames.
  2. 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/.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions