ltx23: compile the VAE in the SPEED profile (7.3s -> ~5.0s)#18
Merged
Merged
Conversation
Adds vae_enabled: true to streaming_speed.yaml's compile block. The SPEED profile already compiles the DiT and text encoder but left the VAE decode running eager -- the single largest warm stage (~2.6s). Measured A/B on the FA4 image (2026-07-09, di-slc-140 B200, single 1920x1088 shape, only variable = this flag): warm end-to-end gen 7.16s -> 5.02s (~2.1s, ~30%). Boots cleanly with NVFP4 + max-autotune + FA4, no OOM; cold-compile +~3min (absorbed by the Mega-Cache). torch.compile is numerically ~identical, so output is quality-neutral (seed-locked sample pairs visually indistinguishable). This aligns SPEED with FastVideo's own batch recipe (video_generation.py sets vae_enabled=ENABLE_TORCH_COMPILE, default on); streaming_demo.yaml -- which this file mirrors -- omitted it for the streaming/segment path, which we don't use. Requires a re-bake: the Mega-Cache save_cache_artifacts() call after the first forward now snapshots the VAE inductor/triton graphs into the per-shape blobs. New image tag 2.1.5-ltx23-fa4vae-d333ce5e (recipe change; shape hash unchanged). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
vae_enabled: truetoltx23/streaming_speed.yaml'scompile:block. The SPEED profile already compiles the DiT and text encoder but left the VAE decode running eager — the single largest warm stage (~2.6s).Why / measurement
A/B on the current FA4 prod image (
2.1.5-ltx23-fa4-d333ce5e), di-slc-140 B200, single 1920×1088@121 shape, only variable = this flag:~2.1s / ~30% faster warm gen, variance ~0. Boots cleanly with NVFP4 + max-autotune + FA4, no OOM; cold-compile +~3 min (absorbed by the Mega-Cache).
torch.compileis numerically ~identical → quality-neutral (seed-locked sample pairs visually indistinguishable; the few sub-pixel diffs are fp-reassociation noise, non-systematic).Recipe alignment
This matches FastVideo's own batch recipe (
video_generation.pysetsvae_enabled=ENABLE_TORCH_COMPILE, default on).streaming_demo.yaml— which this file mirrors — omitted it for the streaming/segment path (streaming_decode), which we don't use; our path is one-shot batch (vae.decode).Ship requirement
Needs a re-bake:
save_cache_artifacts()(after the first forward) now snapshots the VAE inductor/triton graphs into the per-shape Mega-Cache blobs. New image tag2.1.5-ltx23-fa4vae-d333ce5e(recipe change; shape hashd333ce5eunchanged). A stale blob simply cold-compiles the VAE — never wedges a pod.Validation gates before rollout (fresh-boot-from-image): time-to-ready under the 30-min probe budget with the larger blob; first warm gen ~5s (proves VAE replayed from cache, not cold); quality parity. Then canary → fleet.
🤖 Generated with Claude Code