π FRED UNET Loader With Name
The FRED UNET loader that hands you the filename
- model
- filename
The stock UNETLoader loads a diffusion model and gives you one thing: a MODEL. The π FRED UNET Loader With Name does exactly the same job and then hands you the model's filename as a plain string on the side. That's the whole gimmick, and honestly it's a good one if you've ever caught yourself hardcoding "flux1-dev-fp8" into a filename token or a text box because nothing in your graph actually knew what model was loaded.
The one-sentence summary: drop it in wherever you'd use ComfyUI's built-in UNETLoader, and for free you get the name of whatever you loaded. It's a ComfyUI-FRED-Nodes-v2 convenience wrapper around the exact same comfy.sd.load_diffusion_model call the core node uses - same diffusion_models folder, same behavior. You're not losing anything by using it.
What you set
Three inputs, and you'll touch two of them.
- unet_name - a dropdown populated from everything in your
models/diffusion_modelsfolder, exactly like the built-in loader. - weight_dtype - the fp8 switch.
defaultkeeps the model's own precision.fp8_e4m3fnquantizes weights to fp8 at load, roughly halving VRAM for big models like Flux Dev (the "Fits on a 12GB card" setting of the era).fp8_e4m3fn_fastis the same dtype with ComfyUI's fp8 attention optimizations turned on - faster, and the one most people end up on for Flux.fp8_e5m2is the cruder fp8 variant; treat it as last resort unless the model specifically wants it. If you have the VRAM,defaultis still the quality pick. - strip_path_and_extension - this is the interesting one, and the default is
true. With it on, a file atflux/flux1-dev-fp8.safetensorsoutputsflux1-dev-fp8. Flip it off and you get the full subfolder path and extension, which you might actually want if you're scripting something that needs to reconstruct the path.
What comes out
Two outputs: model (a MODEL - the U-Net that does the denoising; wire it to your KSampler just like always) and filename (a STRING). That string is the reason this node exists. Pipe it into a text box, a save-path token, metadata handling, or any node that eats a STRING - for instance, the rest of this pack's family (FRED's image saver and XMP nodes do token substitution like %model_name). It's the "With Name" pattern the pack applies to checkpoints too (FRED_CheckpointLoaderWithName lives in the same file and does the same trick with the full checkpoint triple).
Installing it
It ships in ComfyUI FRED Nodes v2, so install the pack once and both nodes appear. Easiest via ComfyUI Manager (search "ComfyUI FRED Nodes v2"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/Poukpalaova/ComfyUI-FRED-Nodes_v2.git
then restart ComfyUI. One honest warning: the pack's requirements file pulls in a lot of stuff this node never touches - opencv-python, facexlib, piq, colour-science, an image-quality git install - because the same repo carries face cropping, quality inspection, and image-saving nodes. The loader itself only needs ComfyUI core, but you don't get to pick; the whole pack installs together. If you're only here for the loader it's still a fine trade, just know the pip install runs longer than the one node justifies.
Where people get burned
Not much to trip over with a wrapper this thin, but two things: leaving strip_path_and_extension on when you actually wanted the path, and forgetting that the filename output is a STRING, not a MODEL - wire the model, not the name, into your KSampler. Also note the fp8 dtype choices are load-time decisions: switching weight_dtype re-loads the model and can nudge output slightly, so pick one and stop flipping it if you're chasing a seed-matched result.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| unet_name | COMBO | 0 options: | |
| weight_dtype | COMBO | 4 options: default, fp8_e4m3fn, fp8_e4m3fn_fast, fp8_e5m2 | |
| strip_path_and_extension | BOOLEAN | true | Remove path and extension from checkpoint name output |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| model | MODEL | U-Net model (denoising latents) |
| filename | STRING | model filename |