HuggingFace Diffusion Model Loader
FLUX.1 dev without the folder-shuffling
- MODEL
HuggingFace Diffusion Model Loader is the pack's way of loading a diffusion model directly from the Hugging Face cache, and its default repo_id tells you exactly who it's for: black-forest-labs/FLUX.1-dev. If you want to run FLUX.1 dev (the 12B non-commercial tier that reset the quality bar in 2024 and is still the baseline everything gets measured against - see the KB's flux-1 panel) without manually copying transformer weights into ComfyUI's models/diffusion_models folder, this node is the shortcut. It emits just the MODEL - no CLIP, no VAE - so you pair it with HfClipLoader and a VAE loader.
Like every HF loader in this pack, it's cache-only: it will not download the model for you. The repo must already be in your local HF cache, or you point it at a local path. Run hf download black-forest-labs/FLUX.1-dev once, and every future workflow just works offline.
The inputs
- repo_id - defaults to
black-forest-labs/FLUX.1-dev. Change it for any other diffusion repo. - weight_dtype - the memory/quality tradeoff:
default,fp8_e4m3fn,fp8_e4m3fn_fast, orfp8_e5m2. Thefp8options load the model in 8-bit float, which is how people squeeze 12B models onto consumer cards -fp8_e4m3fn_fastadds FP8 matmul optimizations for speed,fp8_e5m2is the slightly coarser variant. If the model fits in full precision, leavedefault; if VRAM is tight,fp8_e4m3fnis the sweet spot. - subfolder (optional) - defaults to
transformer, where FLUX repos keep their weights. - filename (optional) - auto-detects; for sharded models, use the
.index.json.
One output: MODEL.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/Duanyll/duanyll_nodepack
cd duanyll_nodepack && pip install -r requirements.txt
or ComfyUI Manager → "Duanyll Nodepack" → install → restart.
The honest tradeoff
The cache-only design cuts both ways. On one hand: no more hunting through ComfyUI's models tree, one hf download command manages everything, and it works fully offline with zero surprise disk writes at runtime. On the other: if you came from the ComfyUI world, the built-in UNETLoader/DiffusionModelLoader already handles local files, and this node adds nothing unless your models live in the HF cache. But for FLUX specifically, the cache path is where BFL publishes, the subfolder/type defaults are right, and the fp8 options cover the VRAM strategies everyone actually uses. It's the pack author's personal FLUX pipeline, packaged - and for the FLUX-in-HF-cache user, it's genuinely the cleanest loader in the bunch.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| repo_id | STRING | black-forest-labs/FLUX.1-dev | The Hugging Face repo ID, an absolute path (/path/to/model), or a relative path (./models/...) from the ComfyUI root. |
| weight_dtype | COMBO | 4 options: default, fp8_e4m3fn, fp8_e4m3fn_fast, fp8_e5m2 | |
| subfolderopt | STRING | transformer | The subfolder where the model is located. Applies to both Hugging Face repos and local paths. |
| filenameopt | STRING | The checkpoint file to load. If not specified, will auto-detect. For sharded checkpoints, use the index file (e.g., 'model.index.json'). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |