feat: add fastwan video family (FastWan-QAD-FP8-1.3B)#10
Merged
Conversation
Johan-de-R
force-pushed
the
johan/fastwan
branch
from
June 29, 2026 20:53
940a1ad to
6695ce8
Compare
Johan-de-R
changed the base branch from
johan/x264-threads-cap
to
deep-main-v1.1.1-videogen
June 29, 2026 20:53
New examples/diffusers/fastwan/ family (VIDEO_MODEL_FAMILY=fastwan) for the Wan2.1-T2V-1.3B FP8 QAD distillation: single-stage pipeline, FP8 e4m3 linear (always on), Flash attention, 832x480 @ 81 frames @ 3 steps, no CFG. Reuses the shared lib/ subprocess pool + warmup unchanged. Dockerfile: parameterize the fastvideo-kernel CUDA arch (CUDA_ARCH_CMAKE) so the same image builds for H100/sm_90 (--build-arg TORCH_CUDA_ARCH_LIST=9.0a CUDA_ARCH_CMAKE=90a FASTVIDEO_SHA=82ed9fe5). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Johan-de-R
force-pushed
the
johan/fastwan
branch
from
June 30, 2026 00:28
6695ce8 to
586b57f
Compare
Second 480p/5s shape (480x832 @ 81f). Both shapes stay boot-warm via the K=2 subprocess pool (VIDEO_POOL_MODE=1). Bumps IMAGE_SHAPE_HASH -> needs a fresh image bake; matched in backend ttv.py _FASTWAN_SIZE_TABLE/FastWanQADFP8In. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ait) The TAEHV generate_video wrapper accepted width/height/num_frames but never passed them into the FastVideo latent request, so every shape rendered the model default (832x480) -- portrait 480x832 silently came out landscape. Set them on SamplingParam via request['sampling'] so each pool subprocess renders (and compiles for) its actual shape. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The family was copied from ltx23/; the serving code was updated but the docs/test-helpers/comments were left as verbatim LTX-2.3. No serving-logic changes here. - Delete the 4 verbatim-LTX docs (ARCHITECTURE/RUNBOOK/CACHING/ prompt_extension_system_prompt) — not referenced by code; the canonical shared docs live in ltx23/. - preflight_test.py: point at the fastwan factory/model/label (was importing ltx23.factory + defaulting to the LTX model). - test_shapes.py: pin FastWan's real 2-shape menu hash (8840f800), and fix the VAE dim constraint 32->16 (Wan2.1 stride, was LTX's). - __init__/worker/warmup: fix LTX-2.3 docstrings/comments; rename LTX23_EAGER_WARM -> FASTWAN_EAGER_WARM (nothing sets it). LTX_MEGACACHE_* left as-is (shared cross-family cache contract). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Formatting-only (black 23.1.0 reformat of factory.py, isort import order in preflight_test.py) to satisfy the repo pre-commit hook. No behavior change. Co-Authored-By: Claude Opus 4.8 <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.
Summary
Adds the
fastwanvideo-model family forFastVideo/FastWan-QAD-FP8-1.3B(Wan2.1-T2V-1.3B FP8 QAD distillation).examples/diffusers/fastwan/— copied fromltx23/:factory.pyfor the single-stage Wan2.1 pipeline with always-on FP8 (transformer_quant) and a TAEHV tiny-decoder path (output_type="latent"→ TAEHV decode → mp4), ~2.6s/clip vs ~5.8s with the full Wan VAE.worker.py/warmup.pydispatch tofastwan.factory. Reuses the sharedlib/subprocess pool + warmup unchanged.shapes.json= two 480p/5s shapes: landscape 832×480 and portrait 480×832 (both 81 frames, 3 steps, guidance 1.0 / no CFG). Both kept boot-warm by the shared K=2 subprocess pool (VIDEO_POOL_MODE=1,VIDEO_POOL_MAX_SIZE=2) — one shape-pinned process each.factory.pyplumbswidth/height/num_framesinto the FastVideo latent request (SamplingParam) so each shape renders its actual dimensions. Without this the generator fell back to the model default (832×480) and portrait silently came out landscape.Dockerfile: parameterize the fastvideo-kernel CUDA arch (CUDA_ARCH_CMAKE) so the same image builds for H100/sm_90 (FastWan runs on H100, not B200). Build:--build-arg TORCH_CUDA_ARCH_LIST=9.0a --build-arg CUDA_ARCH_CMAKE=90a --build-arg FASTVIDEO_SHA=82ed9fe5 --build-arg INCLUDE_FASTWAN_TAEHV=1.Shipping without the Mega-Cache bake (the gpu_worker patch + per-shape blob wiring are present and opt-in via
LTX_MEGACACHE_DIR, left unset for now — cold-compiles both shapes on boot, ~86s, paid rarely at min=1).Base:
deep-main-v1.1.1-videogen.Validation
fastvideo-runtime:2.1.5-fastwan-taehv-2shape-fix(sm_90) built + pushed; both shapes warm on boot (86.6s preflight, K=2 pool).Companion backend PR: deepinfra/backend#3325 (deepapi schema/routing + frontend-no-weights fix).
🤖 Generated with Claude Code