UnetLoaderGGUFAdvanced
UnetLoaderGGUFAdvanced loads a UNet (the diffusion model component used during sampling) from a GGUF file.
Unet Loader GGUF Advanced
Description
UnetLoaderGGUFAdvanced loads a UNet (the diffusion model component used during sampling) from a GGUF file. It is the extended variant of the standard GGUF UNet loader: in addition to selecting which file to load, it exposes controls over how quantized weights are dequantized, which dtype patch data uses, and whether patching is performed directly on the compute device.
GGUF files store weights in a quantized format, so the loader must convert them to a usable floating point representation while loading. The Advanced node lets you influence that conversion and the patching path. Leaving every option at default gives the same behavior as the regular loader, so the extra controls are opt-in.
Inputs
unet_name
A required combo selection. This is the GGUF UNet file to load, chosen from the GGUF files the node discovers in the ComfyUI model search paths. The selected file determines the quantization layout that the loader will dequantize.
dequant_dtype
A required combo with default default. Options are default, target, float32, float16, and bfloat16.
This controls the dtype used when dequantizing the GGUF weights into the working model:
defaultlets the loader choose the dtype automatically.targetresolves to the dtype associated with the target model or active device precision.float32,float16, andbfloat16force that specific dtype.
Higher precision keeps the dequantized weights closer to the original but costs more memory; float16 and bfloat16 are lighter alternatives.
patch_dtype
A required combo with the same default (default) and the same options: default, target, float32, float16, and bfloat16.
This controls the dtype used for patch tensors applied during loading. default follows automatic selection, target follows the target dtype, and an explicit choice forces that dtype for patching. It is independent of dequant_dtype, so the two can be set to different precisions when you want, for example, full precision weights with lighter patch data or the reverse.
patch_on_device
A required boolean with default false.
When false, patches are prepared and applied on the CPU before the model is moved to the compute device. When true, patching happens directly on the compute device. Running on device can avoid extra transfers and speed up loading, but it increases VRAM usage and may behave differently on low-memory systems.
Outputs
The node produces the loaded UNet model, ready to be connected to a sampler or other model-processing node.
Usage Notes
- For typical use, leave
dequant_dtype,patch_dtype, andpatch_on_deviceat their defaults. This matches the behavior of the standard GGUF UNet loader. - Lower the dtype options (
float16orbfloat16) when VRAM is tight; raise tofloat32only when maximum fidelity matters more than memory. - Enable
patch_on_devicewhen you have VRAM headroom and want to avoid the CPU patching step. Keep it disabled on constrained systems to reduce peak memory use. - Only GGUF-quantized UNet files are valid here. Selecting a regular checkpoint format will not work with this loader.
Comments
Sign in with GitHub to join the discussion.