Load Diffusion Model (with Name)
The Loader That Names Your Files So You Don't Have To
- MODEL
- STRING
You know the drill: you render a batch, save four images, and they all come out as ComfyUI_00001 through _00004. Which one used which model? Good luck. Load Diffusion Model (with Name) (UNETLoaderWithName) is a tiny answer to exactly that problem - a drop-in replacement for ComfyUI's built-in "Load Diffusion Model" node that also hands you the model's filename as a string, so you can auto-stamp it into your output filenames and metadata.
It's a small pack, one node, and it doesn't pretend to be more. If you're tired of typing flux1-dev into your save node by hand (and then forgetting to update it when you switch models), this is a genuinely nice quality-of-life fix.
What it actually is
Under the hood this is a thin, honest wrapper around ComfyUI's own UNETLoader. Same folder (models/diffusion_models), same dropdown, same comfy.sd.load_diffusion_model call underneath. The only real addition is a second output: a STRING holding the model filename with the extension stripped - flux1-dev-Q8_0.gguf becomes flux1-dev-Q8_0. That's the whole trick, and it's the right one. There are no hidden dependencies, no bundled models, no requirements file at all. Clone it, restart, done.
One thing worth knowing: the pack is written against the newer comfy_api.latest node API (ComfyExtension + io.ComfyNode) rather than the legacy NODE_CLASS_MAPPINGS style. Practically that means you need a current ComfyUI - if you're running an install from before the new node system rolled out, update ComfyUI first or the node simply won't register.
The inputs that matter
There are only two, and neither is exotic:
- unet_name - the dropdown, populated from your
diffusion_modelsfolder. Same models the stock loader sees, nothing extra to download. - weight_dtype -
default,fp8_e4m3fn,fp8_e4m3fn_fast,fp8_e5m2. These are the stock loader's options, not new: cast the loaded weights to fp8 to save VRAM.fp8_e4m3fn_fastis just e4m3 with thefp8_optimizationsflag on. Leave it ondefaultunless you know why you're changing it.
Wiring the STRING output
Load Diffusion Model (with Name)
├─ MODEL → KSampler → VAE Decode → Save Image
└─ STRING → (image saver's filename input, or metadata)
The MODEL output goes wherever the stock loader's would. The STRING output is the whole point, and here's the one gotcha: the default Save Image node's filename_prefix is a plain text widget, not a wire-able port. To actually use the string you need an image-saver node that accepts a STRING input (the WAS-style savers and most "save with dynamic name" packs do), or feed the string into a metadata node. The README's example shows it hooked into a save node's prefix - that's the right shape, just pick a saver that takes a wire.
Installing
ComfyUI Manager is the easy path - search for comfyui-diffusion-model-loader-with-name. Or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/suito-venus/comfyui-diffusion-model-loader-with-name
# restart ComfyUI
If the node doesn't appear in the loaders category after a restart, your ComfyUI is too old for the new-style node API - update it and refresh. And if the dropdown is empty, there's nothing in models/diffusion_models; the node can't conjure models it can't see. Beyond that there isn't much to break - that's the benefit of a wrapper this small.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| unet_name | COMBO | 0 options: | |
| weight_dtype | COMBO | default | 4 options: default, fp8_e4m3fn, fp8_e4m3fn_fast, fp8_e5m2 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |
| STRING | STRING | — |