# Huawei releases trick to reduce the size of Diffusion models

> Source: <https://huawei-csl.com/blog/diff4diff/>
> Published: 2026-12-02 10:52:36+00:00

**Recommendation:** When quantizing diffusion transformers to W4A4, give the CFG branch mean and difference separate scales before rounding; the paper measured 6.2%–52.8% lower LPIPS at under 0.3% latency overhead with no retraining.
More in the playbook "Inference and self-hosting": <https://wpnews.pro/playbooks/inference-serving>

## Differential Activation Quantization for Diffusion Transformers.

Diff4Diff helps four-bit diffusion transformers generate images, video and 3D shapes **closer to their full-precision outputs**. Its fixed 2×2 transform works with an existing quantizer and requires **no additional training, calibration data or estimated statistics**.

Classifier-free guidance steers each denoising step using the difference between a conditional prediction and a baseline prediction. The branches share much of their signal, so rounding them independently can erase the small differences that guide generation.

At each shared linear projection, Diff4Diff gives the branch mean and difference their own quantization scales, then reconstructs both branches. We tested it with SVDQuant, Q-DiT and MACaQ using their existing calibration procedures.

## Look closely at the same frame.

[Wan-AI/Wan2.2-TI2V-5B-Diffusers](https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers)

Choose one of four sequences to compare the BF16 reference with SVDQuant and SVDQuant + Diff4Diff. Pause on a frame or zoom in to follow the same detail across the comparison.

## Four-bit image quantization.

[Tongyi-MAI/Z-Image](https://huggingface.co/Tongyi-MAI/Z-Image)

Each comparison uses the same prompt and seed. The coupé and London street are the two Q-DiT examples from Figure 4 of the paper.

**Prompt** bee that has a big compass built into its body

## The shape behind the color.

[TencentARC/Pixal3D-D](https://huggingface.co/TencentARC/Pixal3D-D)

Each object starts from a photograph. All three reconstructions use the same camera. The colors show which way each surface faces. Look at the wire dividers, the wheels or the openings in the ceramic pot. The four-bit runs use the paper’s adaptation of SVDQuant.

## What guidance amplifies

At each denoising step, classifier-free guidance (CFG) compares a prediction conditioned on the prompt, *v*<sup>+</sup>, with a baseline prediction, *v*<sup>−</sup>. The guided prediction *g* is what the sampler uses for its next step. To compute it, start from the baseline and add the difference between the predictions, weighted by the guidance scale *s*:

*g*=

*v*

<sup>−</sup>+

*s*(

*v*

<sup>+</sup>−

*v*

<sup>−</sup>)

### Preserving the difference inside a layer

The same issue arises earlier, inside the denoiser. Two branches entering a linear layer often carry nearly the same signal. Suppose one activation is **1.03** and its counterpart is **1.01**. On a grid spaced by 0.1, both round to 1.0. Each value changes only slightly, yet their entire difference of 0.02 disappears.

Even if each branch gets its own scale, both scales must cover the full branch values. Diff4Diff takes the difference *before* rounding. The quantizer can then choose one scale for the mean and another for the typically smaller differences. Its four-bit levels can resolve finer changes in that second signal.

## How much closer to BF16?

The paper measures how much Diff4Diff reduces perceptual distance (LPIPS) compared with the same W4A4 quantizer alone. Larger percentages mean a greater reduction. For 3D, the comparison uses rendered surface normals.

| Relative LPIPS reduction with Diff4Diff |  |  |  |  | 
|---|---|---|---|---|
| Model | Output | SVDQuant | Q-DiT | MACaQ | 
|---|---|---|---|---|
| [Tongyi-MAI/Z-Image](https://huggingface.co/Tongyi-MAI/Z-Image) | Image | 6.2% | 11.3% | 10.5% | 
| [Wan-AI/Wan2.2-TI2V-5B-Diffusers](https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers) | Video | 29.6% | 26.4% | 19.0% | 
| [Wan-AI/Wan2.2-I2V-A14B-Diffusers](https://huggingface.co/Wan-AI/Wan2.2-I2V-A14B-Diffusers) | Video | 8.3% | 10.4% | 2.2% | 
| [TencentARC/Pixal3D-D](https://huggingface.co/TencentARC/Pixal3D-D) | 3D | 19.0% <sup>*</sup> | – | 10.4% | 
| [3DTopia/3DTopia-XL](https://huggingface.co/3DTopia/3DTopia-XL) | 3D | 52.8% <sup>*</sup> | – | 36.8% | 

**<0.3%**

### End-to-end latency overhead

Measured in the paper’s matched W4A4 image and video pipelines, with the branch transforms fused into the projection kernels.

## The Diff4Diff preprint.

Explore the derivation, paired evaluations and fused kernels in the full Diff4Diff preprint.

[Back to top](#diff4diff-top)
