explaingit

excosy/comfyui_bnb_nf4_fp4_loaders

Analysis updated 2026-05-18

0PythonAudience · developerComplexity · 3/5Setup · moderate

TLDR

A small ComfyUI add-on with two nodes for loading NF4 or FP4 compressed Flux model checkpoints, saving memory when running AI image generation workflows.

Mindmap

mindmap
  root((NF4 FP4 Loaders))
    What it does
      Loads compressed models
      Checkpoint and UNET nodes
      Drops into Flux workflows
    Tech stack
      ComfyUI
      Python
      bitsandbytes
    Use cases
      Memory efficient loading
      Flux workflows
      Mixed format setups
    Audience
      ComfyUI users
      Image generation hobbyists

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Load a compressed NF4 or FP4 Flux checkpoint into a ComfyUI image generation workflow.

USE CASE 2

Reduce memory usage when running Flux models on limited GPU hardware.

USE CASE 3

Swap a compressed UNET loader into an existing Flux workflow without rebuilding it.

USE CASE 4

Combine this NF4 loader with a separate GGUF loader for a mixed-format setup.

What is it built with?

PythonComfyUIbitsandbytes

How does it compare?

excosy/comfyui_bnb_nf4_fp4_loaders0xallam/my-recipe0xhassaan/nn-from-scratch
Stars00
LanguagePythonPythonPython
Last pushed2022-11-22
MaintenanceDormant
Setup difficultymoderatemoderatemoderate
Complexity3/52/54/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires an existing ComfyUI installation, the bitsandbytes library, and separately downloaded NF4 or FP4 compressed model files.

In plain English

This project is a small add-on for ComfyUI, a popular node-based interface for running AI image generation workflows such as Stable Diffusion and Flux. It adds two new nodes that let ComfyUI load model files that have been compressed, or quantized, into the NF4 or FP4 formats, which shrink a model's file size and memory use at some cost to precision. The two nodes it adds are one for loading a full compressed checkpoint file and one for loading just the UNET or diffusion portion of a model on its own. Once installed, you simply swap these nodes into an existing Flux image generation workflow in place of the regular model loading nodes, pointing them at compressed model files you have downloaded separately from sites like Hugging Face or Civitai, where NF4-compressed Flux checkpoints and UNET files are commonly shared. Installation is straightforward through ComfyUI's own extension manager, though the README notes you need to select the developer channel there, or alternatively install it directly from its git repository URL. It also requires the bitsandbytes Python library to be installed and an up-to-date version of ComfyUI itself. The code for the loaders was adapted from an existing implementation found in the Forge project, another Stable Diffusion interface. The README is upfront that this project may now be less useful than it once was, noting that a different compression format called GGUF tends to give better results for most users, though it mentions that combining this project's NF4 loader for the main model with a GGUF loader from a separate project for the T5XXL text encoder can still give some users a speed benefit.

Copy-paste prompts

Prompt 1
Help me install this ComfyUI extension using the manager's developer channel.
Prompt 2
Explain the difference between the CheckpointLoaderNF4 and UNETLoaderNF4 nodes in this project.
Prompt 3
Show me where to download NF4-compressed Flux checkpoints compatible with these loader nodes.
Prompt 4
Help me understand why the README suggests GGUF might work better than NF4 for my setup.

Frequently asked questions

What is comfyui_bnb_nf4_fp4_loaders?

A small ComfyUI add-on with two nodes for loading NF4 or FP4 compressed Flux model checkpoints, saving memory when running AI image generation workflows.

What language is comfyui_bnb_nf4_fp4_loaders written in?

Mainly Python. The stack also includes Python, ComfyUI, bitsandbytes.

How hard is comfyui_bnb_nf4_fp4_loaders to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is comfyui_bnb_nf4_fp4_loaders for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.