Commit Graph
1182 Commits
Author SHA1 Message Date
Aryan Kumar 3a6f4a29b4 [bugfix] MiniMax H3: drop the audio/video decode overlap; tests use envs overrides; regenerate env docs 2026-11-01 17:06:18 -08:00
Aryan Kumar 1ee3aff3b6 [perf] NVFP4: use the cuDNN mm_fp4 backend for MiniMax-H3 DiT profiles on sm_100 2026-11-01 09:34:19 -08:00
Aryan Kumar 1c8eeb74b4 [misc] trim comments 2026-11-01 09:16:05 -08:00
Aryan Kumar 3653c800a4 [perf] MiniMax H3: overlap audio decode by default on CUDA 2026-11-01 09:15:31 -08:00
Aryan Kumar d71590ef31 [perf] MiniMax H3: overlap the audio decode with the video decode
The audio VAE decode (~95 ms) only depends on the audio latents, which are
final when denoising returns, but it ran serially after the ~2 s video VAE
decode. FASTVIDEO_H3_OVERLAP_AUDIO_DECODE starts it on a second CUDA stream
when the video decoding stage begins and merges the waveform back afterwards.
The audio stage mutates the batch (it clears its runtime tensors), so the
thread works on a shallow copy with its own extra dict; errors are re-raised
on the main thread and the stage's deferred modules are released as
PipelineStage.__call__ would.

Measured on the stage bodies with the real video and audio VAEs (768p, 107
frames, GB200, interleaved, 3 rounds): 8.294 s -> 8.224 s (-70 ms of a 95 ms
audio decode, 74% hidden); the audio waveform is bitwise identical. The
remaining cost is power/clock contention between the two streams.

FASTVIDEO_H3_SKIP_FP32_SAMPLES_MIRROR additionally drops the fp32 [0, 1]
samples mirror that generate() builds for return_frames=True requests even
though the frames are produced from the uint8 output. It costs 116 ms and
4.18 GiB of host traffic for a 362-frame clip; with the flag result["samples"]
is None for those requests.

Found with MotionKernel (agent-driven kernel search)
2026-11-01 09:14:37 -08:00
Aryan Kumar 2ac6336b57 [feat]: add opt-in cuDNN SDPA for MiniMax-H3 dense attention
The H3 dense self-attention call always ran on FlashAttention. On GB200,
cuDNN's fused SDPA engine is a few percent faster in-model at 37k-109k
tokens, but the ATen op has no shape metadata: it always reads inputs as
[B, H, S, D], so handing it contiguous [B, S, H, D] is silently misread.

Add FASTVIDEO_MINIMAX_H3_DENSE_ATTN=flash|cudnn (default flash) and route
the dense, unmasked, inference-only call through a helper that presents
BHSD strided views. Training calls, compiled regions, head sizes >128,
non-contiguous inputs, VSA blocks and NVFP4 stay on their existing paths.
FA4_* tuning and the default behaviour are unchanged.
2026-11-01 09:14:02 -08:00
Aryan Kumar f73735f491 [perf] MiniMax H3: compile the VAE decoder transformer block region
The 36 H3 VAE decoder transformer blocks pay ~1.1 s per 768p video in separate
elementwise passes: an fp32 RMSNorm kernel plus an activation-dtype cast,
attn * scale1 plus the fp32 residual add, silu plus mul for the SwiGLU, and
ff * scale2 plus the second residual add. FASTVIDEO_H3_VAE_COMPILE_BLOCKS
routes the block loop through one regional torch.compile graph (default
Inductor mode, no CUDA graphs - the decode is device-busy), where Inductor
fuses each pair into a single pass.

The compiled region takes the block as an argument instead of wrapping
block.forward per block, so Dynamo traces one block-sized graph that every
block and temporal chunk replays.

Decode-only measurements on GB200 (768x1344, tile batch 8, interleaved, warm,
median of 3):

  107 frames: 3.65 s -> 1.97 s (-46.1%), peak 16.1 -> 11.2 GiB
  362 frames: 12.75 s -> 6.91 s (-45.8%), peak 16.2 -> 11.3 GiB
  one-time compile: 8.9 s for the first shape (cold Inductor cache, ~5.8 MB)

Parity: Inductor only fuses pointwise passes, so the fp32 arithmetic is
unchanged; decoded 8-bit frames differ by at most two code values
(max |d| = 2/255, PSNR 72.1 dB, 99.6% identical).

Profiler interaction: with the profiler's default settings the flag does not
hang (collect 4.6 s, export 0.35 s). The hang reproduces with stack capture
(FASTVIDEO_TORCH_PROFILER_WITH_STACK=1): prof.key_averages() then does not
return in 10 minutes on the compiled run (eager: 43 s) and raises
RecursionError at the default limit, because the Inductor CPU frame tree is
much deeper. That is profiler post-processing, not the decode.

Found with MotionKernel (agent-driven kernel search)
2026-11-01 09:14:02 -08:00
Aryan Kumar 594827c23c [bugfix] MiniMax H3: copy the cached uint8 pixel buffer before returning it; drop narration comments 2026-10-31 13:52:14 -07:00
Aryan Kumar 3ad82f2fa1 [misc] encoder tile test: use an evenly tiled grid 2026-10-31 13:23:31 -07:00
Aryan Kumar 5f604a4cbd [misc] yapf 2026-10-31 13:14:56 -07:00
Aryan Kumar 5c05f448a9 [perf] MiniMax H3: opt-in batched VAE encoder tiles 2026-10-31 13:12:43 -07:00
Aryan Kumar 40985dc413 [perf] MiniMax H3: quantize decoded pixels to uint8 on the GPU by default 2026-10-31 13:12:43 -07:00
Aryan Kumar 73cfb7e795 [perf] FA4 FP4 attention: zero only the pad rows before NVFP4 quantization 2026-10-31 13:09:07 -07:00
Aryan KumarandAryan Kumar 4d0a10d989 [docs] Fix the docs build, cookbook memory status, and broken commands (#2023)
Co-authored-by: Aryan Kumar <aryan5v@users.noreply.github.com>
2026-10-30 17:08:41 -07:00
Lifa Ha d9e6c3eb82 [bugfix] Fix extra work in VSA64 layout benchmark (#2027) 2026-10-30 02:30:07 +00:00
Aryan Kumar 7203b4976e [bugfix]: compile only the LoRA delta, not the wrapped base layer
BaseLayerWithLoRA.forward was decorated with torch.compile, so wrapping a linear also compiled its base layer.
Compiling a packed NVFP4/FP8 linear on its own changes its numerics, so a wrapped layer at strength 0 could differ
from the unwrapped layer. forward now adds no compiled region: the base layer runs exactly as it would unwrapped
(eagerly, or traced with a caller's compiled block), and only the adapter delta is compiled.
2026-10-28 14:49:15 -07:00
Aryan Kumar 6bb444eef1 [bugfix]: run the base layer while a LoRA wrapper has no adapter 2026-10-28 14:49:15 -07:00
Aryan Kumar 6743f4b4b7 Revert "[new-model] Add PAN2 text-to-video and image-to-video" (#2025) 2026-10-27 18:03:59 -07:00
465654d900 [bugfix] Reject missing CFG negative conditioning during input validation (#2011)
Co-authored-by: Weiers <16632241+zoechen1212@user.noreply.gitee.com>
Co-authored-by: Aryan Kumar <156166681+aryan5v@users.noreply.github.com>
Co-authored-by: aryan5v <aryan5v@users.noreply.github.com>
2026-10-27 08:45:21 +00:00
69b3829293 [bugfix] Normalize local and HF-cache model paths before registry lookup (#1997)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Aryan Kumar <156166681+aryan5v@users.noreply.github.com>
2026-10-27 07:47:20 +00:00
William Linandaryan5v a0e6cf1f50 [new-model] Add PAN2 text-to-video and image-to-video (#1961)
Co-authored-by: aryan5v <email.aryan1005@gmail.com>
2026-10-25 20:20:00 -07:00
Loay RashidandAryan Kumar 0d05b09c57 [new-model] Add initial Qwen-Image-2.1 inference (#1918)
Co-authored-by: Aryan Kumar <156166681+aryan5v@users.noreply.github.com>
2026-10-25 17:28:49 +00:00
Kyle HuandAryan Kumar a92c5c1578 [docs]: add spark4 CI backend routing (#2014)
Co-authored-by: Aryan Kumar <aryank@Aryans-Mac-Studio.local>
2026-10-24 16:29:44 -07:00
Aryan KumarandAryan Kumar dfc5550c35 [ci] Add FA2-enabled Spark CI image and GB10 reference setup (#2017)
Co-authored-by: Aryan Kumar <aryank@Aryans-Mac-Studio.local>
2026-10-24 16:16:25 -07:00
posiposi443-opsandAryan Kumar 8db2d71ef2 [perf] Cache MLX H3 text refinement and speed up attention (#2002)
Co-authored-by: Aryan Kumar <aryan5v@users.noreply.github.com>
2026-10-23 12:40:47 -07:00
Aryan Kumar 1a1e7216d2 [ci]: Run macOS MLX smoke when a draft PR is marked ready 2026-10-23 12:01:17 -07:00
Aryan Kumar 33bdd2528b [ci]: Require macOS MLX smoke for PRs that touch MLX code 2026-10-23 12:01:17 -07:00
Aryan Kumar 9bbdd18548 [ci]: Fix env-policy and schema-parity contract tests
The unit lane fails on main in two contract tests. All three failures are
bookkeeping that drifted from the code, not runtime bugs:

- `test_env_policy.py::test_env_doc_table_matches_registry`: the generated
  table in docs/contributing/env_vars.md is stale for
  FASTVIDEO_MLX_QUANT_GEMM. Regenerated with the documented command
  (`python fastvideo/tests/contract/test_env_policy.py`).
- `test_env_policy.py::test_env_access_follows_policy`: two new violations.
  - fastvideo/tests/mlx/test_mlx_affine_dq_gemm.py wrote
    FASTVIDEO_MLX_QUANT_GEMM through monkeypatch.setenv; now uses the
    registered field's override() through the env_overrides fixture.
  - fastvideo/tests/train/models/test_load_kandinsky5.py read
    FASTVIDEO_ATTENTION_BACKEND with `not in os.environ`; now uses
    envs.FASTVIDEO_ATTENTION_BACKEND.is_set() and override(). Its entry in
    KNOWN_VIOLATIONS is deleted, as the shrinking-list rule requires.
- `test_schema_parity_inventory.py::..._extension_fields_are_classified`:
  MiniMaxH3PipelineConfig declares video_scheduler_shift and
  audio_scheduler_shift (training-time noise clocks rejected by
  check_pipeline_config at inference); both are added to
  pipeline_config_extensions.internal_only.

Test plan (CPU, no GPU required):

  python -m pytest fastvideo/tests/contract/test_env_policy.py \
      fastvideo/tests/api/test_schema_parity_inventory.py \
      fastvideo/tests/mlx/test_mlx_affine_dq_gemm.py -q
  # 45 passed

  python -m pytest fastvideo/tests/contract/ fastvideo/tests/api/ -q -m "not gpu"
  # 501 passed
2026-10-23 11:08:37 -07:00
Aryan KumarandAryan Kumar 7c2b447264 [ci] Run single-GPU CI lanes on a DGX Spark runner; weekly full suite on main (#2007)
Co-authored-by: Aryan Kumar <aryan5v@users.noreply.github.com>
2026-10-22 13:44:55 -07:00
William Lin e136c2b7f8 [infra]: fix the DGX Spark (GB10) Docker image: importable flashinfer, sm_121a kernels, native-matching output (#1986) 2026-10-22 11:59:31 -07:00
Aryan KumarandAryan Kumar fa2d1324c6 [feat]: FastH3 Omni (Ref2VA) on Apple Silicon MLX (#2000)
Co-authored-by: Aryan Kumar <aryan5v@users.noreply.github.com>
2026-10-21 12:01:54 -07:00
William Lin cdda1b7535 [feat] Add H3 PDD/DMPDD training and packed Ref2VA preprocessing (#1984) 2026-10-20 11:15:57 -07:00
Aryan KumarandAryan Kumar 089a5a55a0 [feat] Cookbook serving, hardware catalog, and landing page (#1999)
Co-authored-by: Aryan Kumar <aryan5v@users.noreply.github.com>
2026-10-20 09:10:29 -07:00
Aryan Kumar 137d9110ca [docs] Make cookbook copy actions explicit and hardware opt-in (#1992) 2026-10-20 09:00:56 -07:00
d4f144581d [feat] Add capacity metadata to existing cookbook model manifests (#1983)
Co-authored-by: leo <yixingwang@YIXINGs-MacBook-Pro.local>
Co-authored-by: aryan5v <email.aryan1005@gmail.com>
Co-authored-by: Aryan Kumar <aryan5v@users.noreply.github.com>
2026-10-20 08:24:19 +00:00
Ishan 5f96664abf [feat] Added a single-GPU VRAM calculator for cookbook deployments (#1978) 2026-10-20 08:12:06 +00:00
376e445f0e [feat]: FastH3 OmniRef inference on consumer devices (RTX 5090 / PRO 6000 / DGX Spark / 4090) (#1980)
Co-authored-by: Aryan Kumar <aryan5v@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 14:57:36 -07:00
2099dd5533 [feat]: Community MiniMax-H3 LoRA loading with quantized side branch (#1973)
Co-authored-by: Aryan Kumar <aryan5v@users.noreply.github.com>
Co-authored-by: SolitaryThinker <wlsaidhi@gmail.com>
2026-10-19 14:29:23 -07:00
0033a9b11d [bugfix] Fix FastH3 regional compile recompiling for every prompt length (#1942)
Co-authored-by: Aryan Kumar <aryan5v@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-10-18 18:22:06 -07:00
91a1c50909 [fix] Fix latent handoff and FastWan-QAD example path (#1557)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: SolitaryThinker <wlsaidhi@gmail.com>
2026-10-18 17:36:40 -07:00
3658b120da [bugfix] Fix tests that fail on main: FastH3 Trim Spark audio, test isolation (#1957)
Co-authored-by: root <root@ptyche0124.ptyche.clusters.nvidia.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: root <root@ptyche0040.ptyche.clusters.nvidia.com>
2026-10-18 16:07:59 -07:00
William Lin 81b73f6b88 [bugfix] Fix cookbook clipboard test blocking docs deployment (#1979) 2026-10-17 23:08:49 -07:00
lpc0220androot d4ed61cc7c [refactor] VSA: rename the sm100a block-sparse kernel to ptx_blackwell (#1956)
Co-authored-by: root <root@ptyche0124.ptyche.clusters.nvidia.com>
2026-10-17 21:10:19 -07:00
William Lin 377c79fa7e [docs] Add William Lin to the contact page (#1977) 2026-10-17 20:52:55 -07:00
Aryan KumarandAryan Kumar 25940a7e86 [docs] Unify cookbook model editors and launch commands (#1970)
Co-authored-by: Aryan Kumar <aryan5v@users.noreply.github.com>
2026-10-16 17:26:51 -07:00
3f45f2da21 [bugfix] Repair DreamVerse and failing CI gates (#1958)
Co-authored-by: sy3535 <sy3535@maxwell.poly.edu>
Co-authored-by: Aryan Kumar <aryan5v@users.noreply.github.com>
2026-10-16 17:15:38 -07:00
Aryan KumarandAryan Kumar 6212e7262e [docs] Migrate documentation and cookbook to Blume (#1969)
Co-authored-by: Aryan Kumar <aryan5v@users.noreply.github.com>
2026-10-16 16:09:04 -07:00
William Lin ba371e33ed [ci] Stop automatically marking issues and PRs stale (#1964) 2026-10-15 01:05:48 -07:00
William Lin 06c8c5f4b8 [docs] Add public contact page (#1959) 2026-10-15 00:26:44 -07:00
William Lin c535797e3d [skill] Remove the add-model and decompose-pipeline-pr agent skills (#1963) 2026-10-15 00:10:49 -07:00