Skip to content

feat: add fastwan video family (FastWan-QAD-FP8-1.3B)#10

Merged
Johan-de-R merged 5 commits into
deep-main-v1.1.1-videogenfrom
johan/fastwan
Jul 1, 2026
Merged

feat: add fastwan video family (FastWan-QAD-FP8-1.3B)#10
Johan-de-R merged 5 commits into
deep-main-v1.1.1-videogenfrom
johan/fastwan

Conversation

@Johan-de-R

@Johan-de-R Johan-de-R commented Jun 29, 2026

Copy link
Copy Markdown

Summary

Adds the fastwan video-model family for FastVideo/FastWan-QAD-FP8-1.3B (Wan2.1-T2V-1.3B FP8 QAD distillation).

  • New examples/diffusers/fastwan/ — copied from ltx23/: factory.py for 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.py dispatch to fastwan.factory. Reuses the shared lib/ 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.py plumbs width/height/num_frames into 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

  • Image fastvideo-runtime:2.1.5-fastwan-taehv-2shape-fix (sm_90) built + pushed; both shapes warm on boot (86.6s preflight, K=2 pool).
  • Benchmarked on H100 (di-slc-13): landscape 832×480 + portrait 480×832, ~2.6s warm, 16 fps, 5.06s. Correct per-orientation dimensions confirmed.

Companion backend PR: deepinfra/backend#3325 (deepapi schema/routing + frontend-no-weights fix).

🤖 Generated with Claude Code

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jun 29, 2026
@Johan-de-R
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 and others added 4 commits June 30, 2026 23:56
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>
@Johan-de-R Johan-de-R changed the title diffusers: add fastwan video family (FastWan-QAD-FP8-1.3B) feat: add fastwan video family (FastWan-QAD-FP8-1.3B) Jul 1, 2026
@github-actions github-actions Bot added the feat label Jul 1, 2026
@Johan-de-R
Johan-de-R merged commit a25aab8 into deep-main-v1.1.1-videogen Jul 1, 2026
14 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation feat

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant