Faster Diffusion Inference on AMD: Sparse Video Attention and 4-bit Image Quantization

Two AMD ROCm blogs tackle the compute and memory bottlenecks in diffusion model inference from complementary angles — one targeting the attention mechanism in video generation, the other pushing image diffusion to 4-bit quantization without accuracy collapse.

Blog Key result Why you should read this
VSA: Video Sparse Attention 3.31× kernel-time speedup vs FlashAttention at 70% sparsity; ~37% lower end-to-end generation time You’re serving or fine-tuning video diffusion models and want a drop-in sparse attention kernel with clear sparsity-vs-speedup guidance instead of guessing where the tradeoff pays off
Quark for HuggingFace Diffusers + SVDQuant Native FP4: ~1.12× vs BF16, ~33% memory reduction; SVDQuant makes w4a4 viable You want to shrink an image diffusion model to 4-bit without the usual outlier-driven accuracy collapse, using a standard Diffusers workflow rather than a custom quantization pipeline

VSA: Accelerating Video Diffusion Inference with Sparse Attention on AMD GPUs

:link: VSA: Accelerating Video Diffusion Inference with Sparse Attention on AMD GPUs — ROCm Blogs

Video diffusion models like Wan2.1, HunyuanVideo, and CogVideoX run attention over enormous token sequences — a typical video generation task produces tokens across both spatial and temporal dimensions, making full attention both compute- and memory-heavy even with FlashAttention. Research has shown that most attention mass concentrates in a small subset of positions, and VSA (Video Sparse Attention) exploits this to reduce computation during inference.

VSA uses a two-stage coarse-to-fine approach: a lightweight pilot pass identifies which blocks of tokens are most attended to, then a second pass runs sparse full-precision attention only on those selected blocks. The key engineering challenge — that sparse patterns must align with GPU tile sizes to produce real wall-clock speedups, not just theoretical FLOP reductions — is addressed by the CK Tile implementation, which encodes sparsity in block-sparse format aligned to hardware tile boundaries.

VSA the method was originally developed by researchers from UC San Diego, MBZUAI, and UC Berkeley and open-sourced; this post covers the AMD Quark team’s CK Tile implementation of it for AMD Instinct GPUs. Measured on a single AMD Instinct MI308X GPU using Wan2.1-T2V-1.3B (832×480, 81 frames, 50 inference steps, BF16), CK VSA delivers a 3.31× kernel-time speedup over dense FlashAttention at 70% sparsity, translating to roughly 37% lower end-to-end generation time at that sparsity level. Speedup scales with sparsity: under 40% sparsity the gain is marginal (~1.6×, dense FlashAttention is a reasonable fallback), 40-60% sparsity yields ~1.9-2.8×, and 70%+ is where CK VSA is recommended.


Quark Support for HuggingFace Diffusers and SVDQuant

:link: Quark Support for HuggingFace Diffusers and SVDQuant — ROCm Blogs

Pushing diffusion models to 4-bit is harder than FP8 or INT8 because both weights and activations in diffusion transformers contain outlier channels that dominate tensor magnitude. A naive 4-bit grid has to stretch to cover those outliers, crushing resolution for everything else. SVDQuant solves this with two complementary techniques: smoothing migrates part of the activation dynamic range into the weights (following SmoothQuant), and a low-rank SVD correction branch captures the residual outliers that low-bit quantization cannot represent.

This blog extends AMD Quark to support SVDQuant inside the HuggingFace Diffusers pipeline via the standard save_pretrained / from_pretrained workflow. On AMD Instinct MI350 (gfx950) with FLUX.1-dev:

  • Native FP4 (w4a4): ~1.12× faster than BF16, ~33% model memory reduction
  • SVDQuant (w4a4 + correction branch): ~0.92× BF16 speed today (correction branch not yet fused), ~27% memory reduction — but makes 4-bit activations viable with accuracy preserved

The tutorial covers three steps: quantize and save via Diffusers, add SVDQuant, then switch to native AMD AITER matrix-core inference with quark.torch.enable_native_inference. Once the correction branch is fused (planned), SVDQuant is expected to exceed BF16 speed while delivering better quality than plain FP4.

These two posts represent the current state of efficient diffusion inference on AMD: sparse attention for video DiTs that cuts compute without touching accuracy, and 4-bit quantization for image diffusion that makes aggressive compression viable. Both ship working code you can run today on AMD Instinct hardware.