Skip to content

v0.7.11

Choose a tag to compare

@dahai80 dahai80 released this 06 Aug 02:03
19179d9

Video DiT diffusion throughput (#367)

HunyuanVideo and Cosmos diffusion loops ran two full-latent DiT forwards per step (uncond + cond, standard CFG). At production frame counts (57-121 frames) every video DiT workflow (2B/7B/13B) exceeded the 1800s budget before reaching VAEDecode.

Performance

  • CFG batched guidance: fuse uncond+cond into a single batched B=2 DiT forward (~2x throughput, no quality change). Both HunyuanVideo and Cosmos DiTs are batch-safe along dim 0.
  • Single-forward shortcut: cfg_scale <= 1.0 skips the uncond branch (cond-only) for guidance-distilled / low-cfg workflows.
  • Step-level it/s INFO logging: replaces debug-only line; reports avg dt + it/s, makes hangs vs. slow steps diagnosable, lets ComfyUI report progress.
  • Wan2/VACE already used batched CFG — unchanged.

Verified on real models

  • HunyuanVideo 13B DiT + Cosmos 7B DiT, 3-step diffusion: batched vs. two-pass converge, no NaN, relative latent diff <1% (Hunyuan 0.86%, Cosmos 0.25%).
  • 122 unit/integration tests pass; ruff + black clean.

Fixed

  • test_gen_acceleration_knobs.py::TestImageGenKnobFlow: 3 pre-existing failures resolved — mocks updated for the FLUX.1 path (mflux.models.flux.cli.flux_generate.Flux1, ModelConfig.schnell()/dev()) from #368/#375.

Full changelog: v0.7.10...v0.7.11