Skip to content

LTX-2.5 token-APPEND: the phase loop is fixed-width, and it is what blocks BOTH the reference arms and the last-frame keyframe #930

Description

@localai-bot

Found while porting ICLoraPipeline (row LTX25-IC-LORA, #923). Filed rather than fixed there because it is a shared prerequisite with a second arm and needs its own spec.

What is blocked

Two conditioning arms, both refused today, and both for this same reason:

The mechanism

Upstream's appending conditioning items concatenate onto latent, denoise_mask, positions and clean_latent:

  • VideoConditionByReferenceLatent.apply_toconditioning/types/reference_video_cond.py:97-100
  • VideoConditionByKeyframeIndex.apply_toconditioning/types/keyframe_cond.py:79-82

and clear_conditioning (ltx_core/tools.py:88-105) trims the appended tokens back off before unpatchify.

What is and is NOT in the way

Re-derived at 4d81ad2, because the cost is much smaller than the two refusals imply:

piece state
the conditioning item ported and gatedLtx2ConditionVideoByReference, src/vllm/model_executor/models/ltx2_conditioning.cpp:221
the VAE encoder ported and reachedLtx2ConvVideoEncode
the DiT's token count not in the wayLtx2ModalityInput::tokens is a per-call field
the DiT's attention mask not in the way — a self-attention strength mask is already accepted (ltx2.h, Ltx2ModalityInput::attention_mask; implemented in ltx2_dit.cpp, mirroring _prepare_self_attention_mask, transformer_args.py:208-237)
Ltx2LatentState having no attention-mask field not in the way for the default arm — at conditioning_attention_strength == 1.0 with no mask, upstream computes attn_mask = None (iclora_utils.py:157-160) and update_attention_mask returns None (mask_utils.py:141-143)
the engine's phase loop this is the gap

One Ltx2VideoTokenCount(vshape, 1) feeds the sigma schedule, the Ltx2ModalityInput handed to the DiT, and Ltx2VideoUnpatchify. It has to carry the GROWN state.tokens through denoise instead, and trim back to the target count before unpatchify.

Done when

  • A reference video supplied through ref_video_dir, together with a --lora whose metadata declares the scale factors, renders rather than refusing.
  • A last-frame keyframe renders.
  • Both gated through a production entry point, with the trim proven by a mutation that removes it.
  • The two refusals are deleted rather than reworded.

Owner: a follow-on row. Listed under ## Owed in ltx25-ic-lora.md.

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