INT4 UNet Loader (INT-Crush)
4-bit UNets without the GGUF detour
- MODEL
The INT4 UNet Loader (INT-Crush) is how you actually run a diffusion model that someone quantized to 4-bit with the INT-Crush converter. Four-bit is the tier where a big UNet stops being a VRAM paperweight and becomes something a mid-range card can breathe with - roughly 4× smaller than fp16. It's not the only road to 4-bit; GGUF Q4 is the more traveled one. But this is a different format with a different trick up its sleeve, and if you have the quantized files, this is the loader that speaks them.
It's a drop-in replacement for ComfyUI's built-in UNet loader, scoped to the INT-Crush format. Feed it a .safetensors from models/diffusion_models/, and out comes a MODEL you wire into your sampler like any other. One thing up front: the pack ships zero models. You either run the companion converter (ThunderFun/int_crush_converter) on your own weights:
python -m converter.cli -i model.safetensors -o ./out --rot-size 256 --int-bits 4
cp ./out/model.safetensors /path/to/ComfyUI/models/diffusion_models/
…or you grab a pre-quantized INT-Crush file wherever the author posted one. No file, empty dropdown, nothing to do.
How it works
4-bit INT-Crush stores two weights per byte (uint8), with fp16 group scales and an optional permutation. The reason there's a rot_size at all: raw 4-bit weights wreck activations, so the converter pre-rotates the weight matrix with a Hadamard transform to make activations quantization-friendly. This loader reads the safetensors metadata (int_crush.format_version / int_crush.rot_size) and auto-detects rot_size, so in practice you don't touch the dropdown. If the file says rot_size=0, it falls back to a W4A16 path (W4A8 needs the rotation to work).
Then it picks a compute backend. auto walks the chain: CUDA via the comfy-kitchen backend if your ComfyUI has it, Triton otherwise, and PyTorch as the always-works-but-slowest floor. Padded layers are detected and fixed automatically.
The inputs that matter
unet_name- the quantized file, picked fromdiffusion_models/. This is the whole point of the node.rot_size- default 256; choices from 0 to 4096. Normally auto-detected. Touch it only when a file lacks metadata and the output looks wrong.kernel_backend-auto/triton/cuda/pytorch. Leave it onauto. Forcingcudawhen comfy-kitchen isn't installed silently drops you to PyTorch.
Output: MODEL, straight into KSampler or the INT-Crush LoRA loader (standard ComfyUI LoRA nodes don't work on these models - separate nodes for that, same pack).
Install
cd ComfyUI/custom_nodes
git clone https://github.com/ThunderFun/ComfyUI-INT-Crush
Restart ComfyUI. Or use ComfyUI Manager and search for "ComfyUI-INT-Crush". There's no pip step - but the fast CUDA path depends on comfy_kitchen and comfy_aimdo, which ship with recent ComfyUI builds, so keep ComfyUI current or you'll land on the slow path.
Where people get burned
- Empty
unet_namedropdown - no INT-Crush file indiffusion_models/yet. Quantize or download first. - Wrong-looking output - the file's metadata is missing and the
rot_sizedefault doesn't match what the converter used. Match it. - Crawling speed - you're on the PyTorch fallback. Update ComfyUI (gets you comfy-kitchen) or make sure Triton is installed.
- Honest warning: the README itself says "This code has not been thoroughly tested" and it was developed with AI assistance. It's early-stage software. Expect a rough edge on Windows in particular, and keep a fallback loader around.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| unet_name | COMBO | 0 options: | |
| rot_size | COMBO | 256 | 10 options: 0, 16, 32, 64, 128, 256, +4 |
| kernel_backendopt | COMBO | auto | 4 options: auto, triton, cuda, pytorch |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |