Skip to content

ltx23: compile the VAE in the SPEED profile (7.3s -> ~5.0s)#18

Merged
Johan-de-R merged 1 commit into
deep-main-v1.1.1-videogenfrom
johan/ltx23-vae-compile
Jul 9, 2026
Merged

ltx23: compile the VAE in the SPEED profile (7.3s -> ~5.0s)#18
Johan-de-R merged 1 commit into
deep-main-v1.1.1-videogenfrom
johan/ltx23-vae-compile

Conversation

@Johan-de-R

Copy link
Copy Markdown

What

Adds vae_enabled: true to ltx23/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).

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:

warm end-to-end gen
VAE compile OFF (prod today) 7.16 / 7.14 / 7.19s
VAE compile ON 5.02 / 5.02 / 5.01s

~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.compile is 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.py sets vae_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 tag 2.1.5-ltx23-fa4vae-d333ce5e (recipe change; shape hash d333ce5e unchanged). 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

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>
@Johan-de-R Johan-de-R merged commit 6ce00ac into deep-main-v1.1.1-videogen Jul 9, 2026
11 of 16 checks passed
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