Calibration is what makes 4-bit quantization expensive. The whole pipeline, text encoder and VAE included, has to fit on a big GPU and run a prompt set while every layer's activations are captured; for a large video model that means a high-end card tied up for hours. diffuse-compressor now skips all of that. Give it a Diffusers model and it reads the transformer's weights, quantizes them, and saves a file Nunchaku Lite can run. A CPU is enough. We tried it on one of the hardest open models around: LTX-2.5, Lightricks' 22B model that makes video with sound.
↑ higher is better · ↓ lower is better. PSNR and SSIM compare each video with the bf16 video for the same prompt, seed and GPU. Every video on this page is machine-generated.
Short version. With no calibration data, our files are the smallest we tested, the fastest on Blackwell, and the closest to bf16 of the 4-bit ones. Lightricks' INT8 is closer to bf16 still, but nearly twice the size. If matching bf16 matters more to you than speed and memory, use it.
No dataset, no pipeline
diffuse-compressor is a model-agnostic SVDQuant toolkit for diffusion transformers. Its calibrated path runs the full pipeline over a prompt set on a GPU to pick smoothing scales and weight the SVD. The data-free scripts use only the weights, with the method from the previous post. In practice:
- No GPU hours. Only the transformer is loaded: no text encoder, no VAE, no sampling. On a 16-vCPU AMD EPYC 7713 with no GPU, FLUX.2 klein-4B quantizes in about 8 minutes (12 GiB of RAM) and Wan2.2-TI2V-5B in about 14 minutes (32 GiB). With a GPU and
--offload-model, klein-4B takes 23 seconds on an RTX PRO 4500. Running the result does need a CUDA GPU. - No data to collect. No prompt set, no captured activations, no guessing whether your calibration prompts match what users will type.
- Any Diffusers model. The generic scripts find the linear layers on their own; there is nothing model-specific to write.
- Same file format. The output is the same Nunchaku format a calibrated run writes, and it loads the same way.
- Weight-only smoothing. Smoothing scales come from the weight itself,
s = 1 / absmax(W[:, j]) ** E. The low-rank branch is a plain SVD of the smoothed weight. --smooth-exponent Esets the smoothing strength from 0 (off) to 1 (flatten every input channel's weight span). The default is 0.5, or 0 with--hadamard.--hadamard(INT4 only) rotates each layer's input with a 64-block Hadamard transform before quantizing. Every data-free script takes it; NVFP4 with--hadamardis rejected.
Why not just INT8? INT8 is popular because it costs nothing to make: no calibration run, no GPU time, often just rounding at load time. Lightricks' NVFP4 file, by contrast, stores a fixed activation scale for every layer, which is normally set from a calibration run. Data-free quantization makes 4 bits as cheap to produce as INT8. On LTX-2.5 the file is about half the size of Lightricks' INT8 and faster per step (results below).
Quantize your own model
One script, data_free/quantize_hf.py, takes any Diffusers model id, finds its linear layers and quantizes them. Here it is on FLUX.2 klein-4B, run from the diffuse-compressor checkout. Pick NVFP4 for Blackwell GPUs and INT4 with rotation for everything else:
# Blackwell (RTX 50xx / RTX PRO 6000 / B200): nvfp4, rank 32
python examples/text_to_image/data_free/quantize_hf.py black-forest-labs/FLUX.2-klein-4B \
--precision nvfp4
# -> outputs/checkpoints/svdq-nvfp4_r32-flux-2-klein-4b-datafree.safetensors
# A100 and older: int4 + Hadamard rotation (smoothing defaults to 0)
python examples/text_to_image/data_free/quantize_hf.py black-forest-labs/FLUX.2-klein-4B \
--precision int4 --hadamard
# -> outputs/checkpoints/svdq-int4_r32-flux-2-klein-4b-datafree-hadamard.safetensorsThen load the file you just made into klein's ordinary Diffusers pipeline, from the same folder (Nunchaku Lite 0.6.1 or newer):
import torch
from diffusers import Flux2KleinPipeline
from nunchaku_lite import load_nunchaku_pipeline
# the NVFP4 file from the first command; for the INT4 one, point
# ckpt at the -hadamard file and set precision="int4"
ckpt = (
"outputs/checkpoints/"
"svdq-nvfp4_r32-flux-2-klein-4b-datafree.safetensors"
)
pipe = load_nunchaku_pipeline(
"black-forest-labs/FLUX.2-klein-4B",
pipeline_cls=Flux2KleinPipeline,
checkpoint=ckpt,
target="manifest", # the generic layout written by quantize_hf.py
precision="fp4",
torch_dtype=torch.bfloat16,
device="cuda",
)
image = pipe(
prompt="a red fox in fresh snow, golden hour",
num_inference_steps=4,
).images[0]
image.save("klein_nvfp4.png")Rotated (-hadamard) checkpoints need Nunchaku Lite's Hadamard quantize op, which is CUDA only.
Other models work the same way. Video models use the copy of the script in the text_to_video folder:
python examples/text_to_video/data_free/quantize_hf.py Wan-AI/Wan2.2-TI2V-5B-Diffusers \
--precision nvfp4The checkpoint loads the same way, with the model's own pipeline class:
import torch
from diffusers import WanPipeline
from diffusers.utils import export_to_video
from nunchaku_lite import load_nunchaku_pipeline
ckpt = (
"outputs/checkpoints/"
"svdq-nvfp4_r32-wan2-2-ti2v-5b-diffusers-datafree.safetensors"
)
pipe = load_nunchaku_pipeline(
"Wan-AI/Wan2.2-TI2V-5B-Diffusers",
pipeline_cls=WanPipeline,
checkpoint=ckpt,
target="manifest",
precision="fp4",
torch_dtype=torch.bfloat16,
device="cuda",
)
frames = pipe(
prompt="a red fox trotting through fresh snow at golden hour, cinematic",
height=480,
width=832,
num_frames=49,
num_inference_steps=50,
guidance_scale=5.0,
generator=torch.Generator("cuda").manual_seed(0),
).frames[0]
export_to_video(frames, "wan_nvfp4.mp4", fps=24)On an RTX PRO 4500 at those settings, the NVFP4 clip takes 45 s against 65 s for bf16, with peak VRAM of 19.4 GiB against 25.8 GiB.
A model too big for your GPU in bf16 can stay on the CPU and be quantized layer by layer on the GPU. Exported this way on the same RTX PRO 4500, Wan2.2-TI2V-5B takes about a minute:
python examples/text_to_video/data_free/quantize_hf.py MODEL_ID \
--precision nvfp4 --offload-model --compute-device cudaAdd --inspect-config to list the layers that would be quantized without quantizing them, --skip PATTERN to keep matching layers in bf16, and --rank N to size the low-rank branch (default 32, a multiple of 16). The default SVD is randomized, so runs differ slightly; --svd-backend full is exact and reproducible. Each run also keeps a cache of the quantized layers so an interrupted export can resume; it can pass 10 GB, and --cache-mode disabled turns it off. FLUX.2 klein and LTX-2.3 also have dedicated scripts in the same folders, which export the same layer layout as their calibrated counterparts.
Trying it on LTX-2.5
LTX-2.5 distilled makes a 5-second, 768×512 clip with sound in 8 denoising steps. The pipeline around its 22B transformer is large too: a Gemma 4 12B text encoder, video and audio VAEs, a vocoder and a diffusion decoder that turns latents into frames. With every part in bf16 on one GPU, the pipeline peaks at 76.8 GB, just inside an 80 GB A100.
The transformer is the biggest part, and it runs 8 times per clip. Making it 4-bit saves memory, and with 4-bit tensor-core kernels each step gets faster too.
The recipe on LTX-2.5
The LTX-2.5 checkpoints use exactly this recipe: weight-only smoothing, a plain SVD and, for INT4, the Hadamard rotation. In diffuse-compressor terms, the NVFP4 file is a data_free/ script with --precision nvfp4 --smooth-exponent 0 and the INT4 file one with --precision int4 --hadamard, using the exact SVD (--svd-backend full). (We actually exported the files with a port of the same recipe to Diffusers' quantize-on-load.)
Each linear layer's weight is split into a rank-32 low-rank branch kept in bf16, which carries the outliers that 4 bits represent poorly, and a 4-bit residual. Both files quantize the same 1,344 linear layers, picked automatically.
| GPU | format | recipe |
|---|---|---|
| Blackwell (tested: RTX PRO 6000) | NVFP4 weights and activations, rank 32 | no smoothing, no rotation |
| other CUDA GPUs (tested: A100, L40S) | INT4 weights and activations, rank 32 | smoothing exponent 0, Hadamard rotation |
Neither file uses smoothing: without activations to measure, smoothing can only guess its scales from the weights, and at rank 32 turning it off did as well or better on LTX-2.3 and FLUX.2-klein in the previous post. That was not re-tested on LTX-2.5.
The rotation spreads outliers across input channels, so the INT4 grid wastes less of its range on them; it is stored in the checkpoint and applied at load time. On FLUX.2-klein it improved INT4 by about 1.7 dB of per-layer output SQNR and made NVFP4 worse, which is why only the INT4 file uses it. That comparison was not repeated on LTX-2.5.
Results against bf16 and Lightricks' files
Every row below runs in the same Diffusers pipeline with the same default (tiled) decoder: 6 prompts with people, 768×512, 121 frames, 8 steps. Lightricks' files ship in ComfyUI format, so they run here through ComfyUI's comfy-kitchen kernels inside the Diffusers pipeline; inside ComfyUI they may be faster or slower.
Speed and memory are for the transformer alone: only the transformer on the GPU, fed the same recorded inputs for all 8 steps. VRAM is the most it used during those steps, weights included. PSNR and SSIM compare whole clips with bf16.
Blackwell: RTX PRO 6000
| transformer | file ↓ | VRAM ↓ | per step ↓ | PSNR ↑ | SSIM ↑ |
|---|---|---|---|---|---|
| bf16 | 39.1 GiB | 36.4 GiB | 870 ms | — | — |
| Nunchaku Lite NVFP4 r32 | 11.2 GiB | 12.1 GiB | 475 ms | 21.12 dB | 0.722 |
| Lightricks INT8 | 20.0 GiB | 19.1 GiB | 658 ms | 26.09 dB | 0.864 |
| Lightricks NVFP4 | 17.4 GiB | 14.7 GiB | 786 ms | 18.86 dB | 0.671 |
Other GPUs: A100 80GB
On the A100 the choice is bf16, our INT4 or Lightricks' INT8.
| transformer | file ↓ | VRAM ↓ | per step ↓ | PSNR ↑ | SSIM ↑ |
|---|---|---|---|---|---|
| bf16 | 39.1 GiB | 36.4 GiB | 1,274 ms | — | — |
| Nunchaku Lite INT4 r32 + rotation | 10.6 GiB | 11.7 GiB | 1,057 ms | 17.15 dB | 0.659 |
| Lightricks INT8 | 20.0 GiB | 19.1 GiB | 1,036 ms | 21.67 dB | 0.792 |
- Least memory on both GPUs. Our transformer needs 12.1 GiB on Blackwell and 11.7 GiB on the A100, against 36.4 GiB for bf16 and 19.1 GiB for Lightricks' INT8.
- Fastest on Blackwell. 1.83× faster per step than bf16, and faster than both Lightricks files. On the A100, ours and Lightricks' INT8 run at about the same speed, both about 1.2× faster than bf16, so there the gain is memory.
- Better at 4 bits. At the same NVFP4 format, ours is 2.3 dB closer to bf16 than Lightricks'. The difference is the bf16 low-rank branch, which keeps weight outliers out of the 4-bit grid.
- Lightricks' INT8 is closest to bf16 on both GPUs. It has twice the bits per weight, so that is expected.
A lower PSNR does not have to mean the video looks worse: a distilled 8-step model turns small numerical differences into a slightly different pose or camera path, and PSNR punishes that as much as it punishes blur. The comparisons below show five of the six prompts on both GPUs, so you can judge for yourself.
Our quantized path is also not bit-reproducible: mean PSNR moves by about 0.3 dB between runs, so treat differences of a few tenths of a dB as noise.
A faster diffusion decoder
LTX-2.5 does not decode latents with a plain VAE: its decoder is itself a small diffusion model, and its last stage (stage 5) dominates decode time. Nunchaku Lite now ships three fused CUDA ops for that stage, in nunchaku-lite-kernels v3:
- per-head q/k RMSNorm and 3D RoPE in one kernel,
- residual add, RMSNorm and modulation in one kernel,
- SiLU gating.
Attention stays on NATTEN. The decoder kernels work with any transformer; the bf16 numbers below use them too.
| decode of 768×512×121, RTX PRO 6000 | time ↓ |
|---|---|
| Diffusers default (tiled) | 3.24 s |
| untiled | 2.77 s |
| fused kernels + untiled | 1.84 s |
The fused decoder matches the unfused one to 56.6 dB PSNR (largest pixel difference 7/255), about what reordering floating-point sums produces. End to end, a full NVFP4 clip goes from 8.0 to 6.2 s (55.2 GB peak) and a bf16 clip from 10.9 to 9.4 s.
Lower VRAM: the text encoder
Once the transformer is 11 GiB, the largest component left is the Gemma 4 12B text encoder at 22.3 GiB. Nunchaku Lite's load_text_encoder_bnb loads it with bitsandbytes 8-bit or NF4 weights straight onto the GPU. RTX PRO 6000, NVFP4 transformer, fused decoder, everything on the GPU:
| text encoder | size ↓ | hidden-state error vs bf16 ↓ | peak VRAM ↓ | s/clip ↓ |
|---|---|---|---|---|
| bf16 | 22.3 GiB | — | 55.2 GB | 6.2 |
| bitsandbytes 8-bit | 12.1 GiB | 1.1% | 46.4 GB | 6.4 |
| bitsandbytes NF4 | 7.0 GiB | 2.9% | 41.9 GB | 7.0 |
With NF4 the whole pipeline peaks at 41.9 GB, down from 76.8 GB for the all-bf16 pipeline. Clip-level PSNR cannot rank the three encoders: the spread between prompts (2 to 5 dB) is larger than the differences between them, so compare a few videos for your own prompts.
In Lightricks' own code
You can also skip Diffusers and use Lightricks' own ltx-core / ltx-pipelines. Nunchaku Lite 0.6.0 runs our transformers there through nunchaku_lite.integrations.ltx_core. The checkpoints for it are in rootonchair/nunchaku-lite-ltx-2.5-distilled-native. They keep Lightricks' file layout and load through ltx-core's own QuantizationPolicy, so its loader, streaming and offloading work unchanged.
Lightricks' DistilledPipeline, 768×512, 121 frames, 16 prompts, each clip scored against the bf16 clip of the same seed in the same pipeline:
| transformer | PSNR ↑ | SSIM ↑ | transformer s/clip ↓ | peak VRAM ↓ |
|---|---|---|---|---|
| RTX PRO 6000 (Blackwell), NVFP4 | ||||
| bf16 (Lightricks) | — | — | 4.46 | 36.2 GB |
| Lightricks NVFP4 | 18.43 | 0.570 | 2.87 | 24.2 GB |
| Nunchaku Lite NVFP4 r32 | 18.09 | 0.558 | 3.01 | 24.2 GB |
| L40S, INT4 | ||||
| bf16 (Lightricks) | — | — | 7.32 | 36.2 GB |
| Nunchaku Lite INT4 r32 + rotation | 17.87 | 0.550 | 4.85 | 24.2 GB |
Lightricks' two-stage pipeline uses an ancestral sampler, which amplifies any numerical difference, so absolute PSNR is lower for every file. Here Lightricks' NVFP4 is slightly ahead of ours on PSNR (by 0.34 dB, close to our run-to-run noise), SSIM and transformer time. Ours still runs the transformer about 1.5× faster than bf16 on both GPUs, and the INT4 file covers GPUs where NVFP4 does not run.
Run the LTX-2.5 files
Nunchaku Lite 0.6.1 is on PyPI. One install covers everything below, including bitsandbytes for the lighter text encoder on Linux and Windows. LTX-2.5 needs Diffusers 0.43 or newer.
pip install -U nunchaku-lite # CUDA kernels download from the Hugging Face Hub on first useThe two checkpoints are in rootonchair/nunchaku-lite-ltx-2.5-distilled: svdq-fp4_r32-ltx-2.5-distilled.safetensors for Blackwell and svdq-int4_r32-ltx-2.5-distilled.safetensors for other CUDA GPUs. They are derivatives of LTX-2.5 under Lightricks' LTX-2.x Community License, which has its own terms, including for commercial use and for labeling generated content.
Convert the base model once
The repo holds only the transformer. The text encoder, VAEs, vocoder and diffusion decoder come from the base model in the Diffusers folder layout, and Lightricks ships LTX-2.5 as single files. Accept the license of the gated Lightricks/LTX-2.5 repo, log in, and convert with the script in the Nunchaku Lite repository, which needs a clone (the pip package does not include it). It downloads 72 GB.
git clone https://github.com/rootonchair/nunchaku-lite && cd nunchaku-lite
hf auth login
python tools/convert_ltx25_distilled.py --out ltx-2.5-distilled-diffusersGenerate
Text to video with audio, 768×512, 121 frames, 8 steps:
import json
import os
import torch
from transformers import AutoModelForImageTextToText, AutoTokenizer
import diffusers
import diffusers.pipelines.ltx2 as ltx2
from diffusers import (
FlowMatchEulerDiscreteScheduler,
LTX2Guidance,
LTX2VideoTransformer3DModel,
LTX25AutoBlocks,
)
from diffusers.pipelines.ltx2.utils import DISTILLED_SIGMA_VALUES
from diffusers.utils import encode_video
from nunchaku_lite import patch_transformer
from nunchaku_lite.adapters.ltx2_decoder import optimize_ltx2_diffusion_decoder
model_dir = "ltx-2.5-distilled-diffusers" # from tools/convert_ltx25_distilled.py
precision = "fp4" # "fp4" on Blackwell, "int4" elsewhere
checkpoint = (
"rootonchair/nunchaku-lite-ltx-2.5-distilled/"
f"svdq-{precision}_r32-ltx-2.5-distilled.safetensors"
)
device = "cuda"
# 1. quantized transformer
transformer = LTX2VideoTransformer3DModel.from_pretrained(
model_dir, subfolder="transformer", torch_dtype=torch.bfloat16
)
patch_transformer(
transformer, checkpoint, target="ltx2", precision=precision, device=device
)
# 2. the other components, bf16
def load_component(name):
path = os.path.join(model_dir, name)
class_name = json.load(open(os.path.join(path, "config.json")))["_class_name"]
cls = getattr(diffusers, class_name, None) or getattr(ltx2, class_name)
return cls.from_pretrained(path, torch_dtype=torch.bfloat16)
# distilled model: no guidance
guidance = dict(
guidance_scale=1.0,
stg_scale=0.0,
modality_scale=1.0,
guidance_rescale=0.0,
spatio_temporal_guidance_blocks=None,
)
components = {
"transformer": transformer,
"text_encoder": AutoModelForImageTextToText.from_pretrained(
os.path.join(model_dir, "text_encoder"), torch_dtype=torch.bfloat16
),
"tokenizer": AutoTokenizer.from_pretrained(
os.path.join(model_dir, "tokenizer")
),
"scheduler": FlowMatchEulerDiscreteScheduler.from_pretrained(
os.path.join(model_dir, "scheduler")
),
"guider": LTX2Guidance(**guidance),
"audio_guider": LTX2Guidance(**guidance),
**{
name: load_component(name)
for name in ("connectors", "vae", "audio_vae", "vocoder",
"diffusion_decoder", "duration_head")
},
}
# 3. pipeline, all on the GPU
pipe = LTX25AutoBlocks().init_pipeline()
pipe.update_components(**components)
for component in pipe.components.values():
if isinstance(component, torch.nn.Module):
component.to(device)
# 4. faster diffusion decoder (needs the v3 kernels)
optimize_ltx2_diffusion_decoder(pipe.diffusion_decoder)
pipe.diffusion_decoder.disable_tiling()
# 5. generate
steps = 8
state = pipe(
prompt=(
"A golden retriever runs through a sunlit meadow of tall grass, "
"ears flapping, birds chirping."
),
width=768,
height=512,
num_frames=121,
frame_rate=24.0,
num_inference_steps=steps,
sigmas=DISTILLED_SIGMA_VALUES[:steps],
use_cross_timestep=True,
enable_prompt_enhancement=False,
generator=torch.Generator(device).manual_seed(0),
output_type="np",
)
video, audio = state.get("videos"), state.get("audio")
encode_video(
video[0],
fps=24.0,
audio=audio[0].float().cpu(),
audio_sample_rate=pipe.vocoder.config.output_sampling_rate,
output_path="ltx25_nunchaku_lite.mp4",
)The script ran as written on an RTX PRO 6000 with both files, peaking at 55.8 GiB of VRAM with NVFP4 and 55.3 GiB with INT4. These are its two outputs:
To fit a smaller GPU, swap in the bitsandbytes text encoder: replace the "text_encoder" entry, and skip it when moving components to the GPU, since it is loaded there already.
from nunchaku_lite.text_encoders import load_text_encoder_bnb
components["text_encoder"] = load_text_encoder_bnb(
AutoModelForImageTextToText,
os.path.join(model_dir, "text_encoder"),
quantization="nf4",
device=device,
) # or quantization="int8"
# step 3: move everything else
for name, component in pipe.components.items():
if isinstance(component, torch.nn.Module) and name != "text_encoder":
component.to(device)The full LTX-2.5 guide has the rest: conversion options, the per-GPU tables, and decoder details.
Limitations
- LTX-2.5 support is a preview. The checkpoints cover the distilled model only.
- The numbers on this page come from the Diffusers port of the recipe. diffuse-compressor's
data_free/scripts have been checked on FLUX.2 klein-4B (exported on a CPU, loaded and run in Nunchaku Lite on a Blackwell GPU) and Wan2.2-TI2V-5B (both loaded and run in Nunchaku Lite 0.6.1 on a Blackwell GPU); not yet on LTX-2.3. - NVFP4 runs only on Blackwell GPUs. On other CUDA GPUs, use the INT4 file.
- Loading the transformer reads the bf16 weights first (about 44 GB of CPU memory) before replacing them with the quantized ones, and converting the base model needs about 85 GB of CPU memory.
- Untiled decoding is faster but needs about 13.5 GB more VRAM at 768×512×121. Tiled and untiled decodes differ from each other (about 30 dB PSNR), so compare outputs only between runs that decode the same way.