MinusZone - Flux1CheckpointLoaderNF4_cpuDynOffload
Flux at 4-bit, plus block paging — but this one needs a side install
- MODEL
- CLIP
- VAE
Flux at 4-bit is the "I'm running this on a card that should not be running this" setup. NF4 packs the 12B model down to roughly a quarter of fp16, which is what lets 6GB-class cards generate Flux at all. MZ_Flux1CheckpointLoaderNF4_cpuDynOffload takes that idea one step further: it loads an NF4 Flux checkpoint and pages its transformer blocks between CPU and GPU, so the already-tiny 4-bit model doesn't even need to sit in VRAM all at once.
The catch in the name
This is the one loader in the pack with a real dependency. It doesn't do the NF4 loading itself - it calls CheckpointLoaderNF4 from comfyanonymous/ComfyUI_bitsandbytes_NF4. If that pack isn't installed, the node raises a clear error telling you to install it. So the install list is:
cd ComfyUI/custom_nodes
git clone https://github.com/MinusZoneAI/ComfyUI-FluxExt-MZ
git clone https://github.com/comfyanonymous/ComfyUI_bitsandbytes_NF4
Both via ComfyUI Manager if you prefer (search ComfyUI-FluxExt-MZ and bitsandbytes_NF4). The NF4 pack has historically been finicky to get recognized - people hit it not showing up in the node list, and fixes range from installing the newer bitsandbytes pip package to relaxing Manager's security_level in config.ini during install. Restart ComfyUI after installing both, and put your NF4 checkpoint in ComfyUI/models/checkpoints.
Inputs and outputs
ckpt_name- dropdown of checkpoints; select your NF4-quantized Flux checkpoint.double_blocks_cuda_size- INT, 0–16, default 7. Double blocks (19 total) resident per chunk.single_blocks_cuda_size- INT, 0–37, default 7. Single blocks (38 total) resident per chunk.
Outputs are MODEL, CLIP, VAE - the standard checkpoint-loader trio, so it drops into an existing Flux workflow without rewiring. As with the rest of this pack, only the MODEL gets the paging patch; CLIP (T5-XXL included) and VAE load the normal way.
How much does the 4-bit + paging stack actually buy you?
Honest answer: NF4 already gets Flux onto 6GB cards in other UIs, so the paging is belt-and-suspenders - the lever that turns "barely fits" into "runs while I scroll Twitter." The tradeoffs are the usual ones: NF4 sits below fp8 and GGUF Q5 on the quality ladder (visible loss, especially in fine detail), and the block swapping adds PCIe transfer time on top of 4-bit dequantization overhead. Where it shines is the very low end - a small card with a slow generation is still a generation.
Gotchas worth knowing
- 0 crashes. Both block sizes accept 0 in the UI but the patch's
range(0, depth, 0)throws. Keep them at 7 or above. - Tweaking the sizes after a run "has bugs" - the author's own README warning. Restart ComfyUI before changing parameters; the hooks mutate the model in place.
- The model still has to fit in system RAM. 4-bit helps there too, but paging means the resident set must live somewhere.
- If the node errors with a message about
ComfyUI_bitsandbytes_NF4, that's not a bug in this pack - it's the missing dependency talking.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| ckpt_name | COMBO | 0 options: | |
| double_blocks_cuda_size | INT | 70–16 | — |
| single_blocks_cuda_size | INT | 70–37 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |
| CLIP | CLIP | — |
| VAE | VAE | — |