Skip to content

feat: LTX-2 model compatibility for video travel pipeline#17

Merged
peteromallet merged 4 commits intomainfrom
feat/ltx2-compatibility
Feb 18, 2026
Merged

feat: LTX-2 model compatibility for video travel pipeline#17
peteromallet merged 4 commits intomainfrom
feat/ltx2-compatibility

Conversation

@peteromallet
Copy link
Collaborator

Summary

Changes

Core model support:

  • Add ltx2_19B to is_t2v() detection
  • Add ltx2 to task type registry (WGP_TASK_TYPES, DIRECT_QUEUE_TASK_TYPES, TASK_TYPE_TO_MODEL)
  • Add ltx2 LoRA path routing (loras/ltx2)

Frame quantization (CRITICAL):

  • Replace hardcoded 4N+1 quantization with model-aware step*N+1 via _get_frame_step() helper
  • LTX-2 uses 8N+1 (frames_steps=8), Wan uses 4N+1 (frames_steps=4)
  • Prevents guide/mask vs output frame count mismatches

FPS handling:

  • Auto-detect model native FPS via _get_model_fps() (24 for LTX-2, 16 for Wan)
  • Set fps_helpers from model FPS when not explicitly provided
  • Default FPS changed to 24 (was 16)

Resolution:

  • snap_resolution_to_model_grid() now accepts configurable grid size
  • LTX-2 VAE block size is 64px (vs Wan's 16px)
  • get_model_grid_size() helper queries model handler

Safety:

  • Minimum frame safety floor now queries model's frames_minimum (17 for LTX-2, 5 for Wan)

SVI exclusion:

  • SVI mode auto-disabled for LTX-2 with warning log
  • SVI uses Wan-specific LoRAs and destructively patches LTX-2's native sliding window

Video prompt type:

  • Added LTX-2-specific video_prompt_type handling in segment processor
  • LTX-2 uses TSEV types (not Wan's U/UM)

Audio preservation:

  • New mux_audio_from_segments() in ffmpeg_ops.py
  • Travel stitch now extracts audio from segments and muxes onto final video
  • LTX-2 generates video+audio; previously audio was silently stripped

Test plan

  • Verify existing Wan model travel pipeline still works (frame quantization, FPS, resolution unchanged for Wan)
  • Test LTX-2 single-segment generation (direct queue)
  • Test LTX-2 multi-segment travel with stitching
  • Verify audio is preserved in LTX-2 stitched output
  • Verify SVI mode is rejected for LTX-2 with appropriate warning

🤖 Generated with Claude Code

peteromallet and others added 4 commits February 13, 2026 23:54
LTX-2 (ltx2_19B) has different requirements from Wan models:
- Frame quantization: 8N+1 (vs Wan's 4N+1)
- FPS: 24 (vs Wan's 16)
- VAE block size: 64px (vs 16px)
- Minimum frames: 17 (vs 5)
- Native sliding window (incompatible with SVI)
- Returns audio alongside video

Changes:
- Make frame quantization model-aware via _get_frame_step() helper
- Add model-aware FPS defaulting via _get_model_fps() helper
- Make resolution grid snapping accept configurable grid size (64 for LTX-2)
- Make minimum frame safety floor query model's frames_minimum
- Add ltx2_19B to is_t2v() model type detection
- Add ltx2 to task type registry (WGP_TASK_TYPES, DIRECT_QUEUE, model mapping)
- Add ltx2 LoRA path routing (loras/ltx2)
- Add LTX-2 video_prompt_type handling in travel segment processor
- Disable SVI mode for LTX-2 (uses Wan-specific LoRAs, breaks native sliding window)
- Preserve audio through travel stitch: extract from segments and mux onto stitched video

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The VACE indicator list included "lightning", "cocktail", "controlnet"
which caused non-VACE I2V models like wan_2_2_i2v_lightning_baseline_2_2_2
to be misidentified as VACE. This led to unnecessary guide video/mask
creation and incompatible VACE parameters being sent to WGP, causing
generations to hang for 25+ minutes until timeout.

All actual VACE models have "vace" in their name, so a simple substring
check is both correct and sufficient.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@peteromallet peteromallet merged commit 81ab6fb into main Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant