v1.4.0 — Faster streaming, VRAM-aware buffer retention
An optimization release focused on consumer GPUs: less allocator churn, smarter weight placement, and faster sampling at long-clip settings. Defaults are proven bit-identical to v1.3.1 (latent PSNR ∞, frame LPIPS 0.0000 vs v1.3.1 across 3 prompts at both 512x320/56f and 1280x736/145f, in every buffer mode).
Performance
- ~15% faster sampling at 1280x736 / 145 frames in stream mode (13.87 vs 16.30 s/it on an RTX 5090; ~9% against warm-cache baseline repeats). One-block lookahead prefetch: the next block's weights stream to GPU while the current block computes.
branch_weights: auto(new default) — pickscache_gpuwhen free VRAM allows (1.5x stage + 4 GiB headroom) andstreamotherwise, so small cards get the safe path without touching settings. Under memory pressure it also prefers the int8_convrot stage file when both versions exist in a stage directory. Decision is logged to the console.retain_buffers: auto/on/off— retained mode keeps the branch's scratch buffers alive between blocks (scan banks, delta-solve scratch, window gather, q/k/v copies) for churn-free steps. Auto resolves from free VRAM (retain when free ≥ stage + 10 GiB) and falls back to the transient v1.3.1 allocation pattern on tight cards.- Allocator traces (CUDA memory snapshots) confirm the peak working set is unchanged vs v1.3.1; the speedup comes from launch/churn reduction, not memory tricks.
fast_kernels (Advanced node)
- Now also compiles the bidirectional scan into a single CUDA-graph replay (replacing 2xF kernel launches per block per step). The compiled scan is exact (0.0 max error vs eager, cudagraph replays included).
- Known issue, now documented + warned: on torch 2.10 the pre-existing fused epilogue/gather kernels measurably drift on 8-step DMD stages. The node logs a warning and the README marks fast_kernels as ablation-only. Keep it off for final renders.
Visibility
- The windowed softmax logs which exact SDPA kernel it dispatches to (flash / cuDNN / mem-efficient), once per session.
- New env override
VDN_H3_WINDOW_SDPA=flash|cudnn|mem_efficientto force a specific exact backend where faster for your card. Exact kernels only — quantized overrides are still never used for the windows.
Hygiene
- Removed the dead duplicated ApplyVDNH3 class definition
- Bypass-mode LoRA weight casts are cached per (dtype, device) instead of re-cast every step
- Adapter safetensors are no longer held as loaded fp32 dicts for the process lifetime (loaded at apply time)
- README updates: video VAE table row now matches the example workflow (int8_convrot), tiled VAE decode recommendation with seam note,
--lowvramcosts documented (20-40%), clickable int8-convrot checkpoint link
Verification
- 12/12 unit tests, including new compiled-scan vs eager parity and transient/retained buffer parity tests
- E2E A/B matrix vs v1.3.1 at fixed seed: bit-identical latents and frames in all default configurations
- Full measurement tables and methodology in Benchmarks.md
Thanks for the crash reports and int8 testing that fed this release. If you run into issues, include your GPU, VRAM, and the console log from [vdn] lines.