load_Nanchaku
The Nunchaku-quantized loader in Apt_Preset, and its one real gotcha
- over_model
- over_clip
- lora_stack
- context
- model
- preset_save
Nunchaku is MIT Han Lab's INT4 quantization engine (built on their SVDQuant technique), and it's a different animal from GGUF - where GGUF trades precision for a smaller file that still runs through normal PyTorch ops, Nunchaku ships a purpose-built inference engine that runs 4-bit weights fast on the actual hardware, which is why it needs its own loader rather than plugging into a generic checkpoint loader. load_Nanchaku is Apt_Preset's version of that loader, and it's built like a sibling to sum_load_adv: one node that bundles the model, the text encoders, LoRA, and your sampling settings, and hands out a single context you feed into the rest of the pack's Controller/Sampler stack.
What you're actually setting. preset picks from the same category of .toml config files used across the pack's loaders (ckpt-basic, clip1-wan, and so on - combinations tuned for specific model families like Wan or Qwen Edit). unet_name is your quantized model file, clip1/clip2 your text encoders, vae your VAE, and lora/lora_strength for a LoRA on top - lora_stack in the optional inputs lets you chain more than one. guidance (default 3.5) is the Flux-style CFG-distillation embed value. Then the usual sampling block rides along in the same node: width, height, steps (default 10 - much lower than a typical checkpoint loader's default, reflecting that quantized/distilled pipelines usually run fewer steps), cfg, sampler, scheduler, and a starting pos prompt. over_model and over_clip are escape hatches - feed them and the node's internal loading is bypassed entirely, useful if you want Apt_Preset's sampling and context plumbing but a model you loaded some other way.
The two settings actually specific to Nunchaku are cache_threshold and attention, and this is where a real hardware gotcha lives. cache_threshold (default 0, range 0–1) controls a first-block caching effect: higher values trade a bit of quality for speed, and setting it to 0 disables the effect entirely. Community tuning on r/comfyui for Nunchaku generally lands around 0.12–0.15 for a noticeable speed bump with only slight degradation - a reasonable starting point if you're chasing throughput. attention picks between nunchaku-fp16 and flash-attention2, and per the pack's own README, RTX 20-series cards can only use nunchaku-fp16 - flash-attention2 isn't available on Turing hardware, and the node defaults to nunchaku-fp16 for exactly that reason. If you're on a 30-series card or newer, flash-attention2 is the faster option and worth switching to.
Outputs. context (RUN_CONTEXT, the pipe into the rest of the pack), model (a raw MODEL wire for anything downstream that wants it directly), and preset_save (PDATA) - the pack's save-slot system. Per the README: you have to select an existing preset before you can use the node at all, or it errors out; you can then modify any parameter freely on top of that preset, and if you save your tweaks as a new preset, ComfyUI needs a restart before that new preset shows up as a selectable option.
Installing it. This node has a hard prerequisite the rest of the pack doesn't: ComfyUI-nunchaku must be installed and confirmed working first - the README says so explicitly, and it's worth taking seriously, because Nunchaku ships prebuilt wheels tied to specific Python/PyTorch/CUDA combinations and getting a mismatched build is a common real-world failure mode (there's a documented r/comfyui thread of Nunchaku going flaky - random noise or black frames on an RTX 20-series card - that cleared up on its own after a few hours with no config change, which is more a "known to be occasionally unstable" data point than something you can reliably fix). Once Nunchaku itself is solid, install Apt_Preset the normal way: search "ComfyUI-Apt_Preset" in Manager, or
cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git
then install.bat on Windows and a restart.
Troubleshooting. In order of likelihood: (1) Nunchaku not installed or not working - install and verify it standalone before blaming this node; (2) on a 20-series card, attention set to flash-attention2 - switch it to nunchaku-fp16; (3) node errors immediately on use - you didn't select a preset, which the README flags as required; (4) a preset you just saved isn't in the dropdown - restart ComfyUI, saved presets don't register live.
Inputs (21)
| Name | Type | Default | Description |
|---|---|---|---|
| preset | COMBO | None | 29 options: None, ckpt-basic/ckpt-sd-AD.toml, ckpt-basic/ckpt-sd-lcm.toml, ckpt-basic/ckpt-sd.toml, ckpt-basic/ckpt-xl-hy.toml, ckpt-basic/ckpt-xl.toml, +23 |
| unet_name | COMBO | 1 options: None | |
| cache_threshold | FLOAT | 0.0000–1 | — |
| attention | COMBO | nunchaku-fp16 | 2 options: nunchaku-fp16, flash-attention2 |
| cpu_offload | COMBO | auto | 3 options: auto, enable, disable |
| clip1 | COMBO | clip_l.safetensors | 1 options: None |
| clip2 | COMBO | t5xxl_fp8_e4m3fn.safetensors | 1 options: None |
| guidance | FLOAT | 3.50–100 | — |
| vae | COMBO | ae.safetensors | 0 options: |
| lora | COMBO | 1 options: None | |
| lora_strength | FLOAT | 1.00-10–10 | — |
| width | INT | 10248–16384 | — |
| height | INT | 10248–16384 | — |
| steps | INT | 101–999999 | — |
| cfg | FLOAT | 1.00–100 | — |
| sampler | COMBO | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 | |
| scheduler | COMBO | 9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3 | |
| pos | STRING | beautiful detailed glow,a girl | — |
| over_modelopt | MODEL | — | |
| over_clipopt | CLIP | — | |
| lora_stackopt | LORASTACK | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| context | RUN_CONTEXT | — |
| model | MODEL | — |
| preset_save | PDATA | — |