Skip to content

LTX-2 bugfixes, distilled mode, and formatting#12

Open
TroyHernandez wants to merge 2 commits intomainfrom
feat/ltx2-improvements
Open

LTX-2 bugfixes, distilled mode, and formatting#12
TroyHernandez wants to merge 2 commits intomainfrom
feat/ltx2-improvements

Conversation

@TroyHernandez
Copy link
Contributor

Summary

  • Fix DiT timestep scaling for distilled models
  • Fix Gemma3 hidden state stacking (include embedding layer)
  • Add distilled mode support to txt2vid_ltx2() (fewer steps, no CFG)
  • Add model_dir parameter for simplified model path configuration
  • Update gpu_poor offloading strings, regenerate man pages, code formatting

Test plan

  • tinytest::test_package("diffuseR") passes
  • txt2vid_ltx2() generates video with distilled model
  • GPU-poor offloading still works correctly

- Fix DiT timestep scaling for distilled models
- Fix Gemma3 hidden state stacking (include embedding layer)
- Add distilled mode support to txt2vid_ltx2 (fewer steps, no CFG)
- Add model_dir parameter for simplified model path configuration
- Update gpu_poor offloading strings for consistency
- Regenerate man pages
- Update test assertions for new defaults
- Code formatting with rformat
Stage 1 denoises at half resolution (8 steps), LatentUpsampler 2x
upscales latents, then Stage 2 refines at full resolution (3 steps).
Matches Wan2GP's distilled pipeline for higher quality output.

New files:
- R/upsampler_ltx2.R: LatentUpsampler module (Conv3d ResBlocks +
  SpatialRationalResampler with PixelShuffle)
- inst/tinytest/test_upsampler_ltx2.R: Unit tests
- ref/: pyrotechnics reference translations from Wan2GP

Modified:
- R/txt2vid_ltx2.R: Two-stage loop, extracted .denoise_loop() helper
- R/gpu_poor.R: Added upsampler_device to all LTX-2 profiles
- CLAUDE.md: Two-stage pipeline learnings
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