ComfyUI Node

UNet加载器

The UNet Loader That Actually Shows You What You're Loading

By a63976659·Created 7 months ago·Updated 5 days ago· 7
UNet加载器
    • 模型
    UNET名称
    权重类型

    What you're actually looking at

    Since Flux landed in August 2024, large models mostly stopped shipping as a tidy bundled checkpoint and started shipping as a diffusion-only weight file - transformer here, text encoder there, VAE somewhere else. That pushed what used to be an advanced-workflow node into being the main way people load a model at all.

    This is one of those. It does the same job as ComfyUI's bundled Load Diffusion Model node, with one deliberate difference: instead of a dropdown of fifty filenames you can't tell apart, you get a thumbnail grid with a search box and per-subfolder tabs. That's the whole pitch. If your diffusion_models folder has four files in it, core is fine. If it has ninety and you've forgotten which one did the good skin texture, this is the node you want.

    Two things to internalize. First, "UNet" is a legacy name - in a Flux, Krea, Wan or Z-Image file you're loading a DiT, and it lives in ComfyUI/models/diffusion_models. Second, this node loads only the diffusion weights: no CLIP, no VAE, no text encoder. A checkpoint bundles all three; a diffusion file bundles none, so the rest of your graph has to supply them.

    The inputs worth knowing

    Two required inputs, both driven by the visual UI:

    • UNET名称 - the model file, listed from models/diffusion_models. Click a card in the grid and it fills in. Subfolders inside diffusion_models become the category dropdown at the top.
    • 权重类型 - the weight precision: default, fp8_e4m3fn, fp8_e4m3fn_fast, fp8_e5m2.

    and one output, 模型 (MODEL), which goes straight into your sampler's model input - or into a LoRA loader first if you're stacking adapters.

    default loads the file at whatever precision it's stored in, which is what you want for a file you know fits. fp8_e4m3fn casts the weights to 8-bit on load: half the VRAM of fp16, with a quality cost the community has treated as close to invisible since Flux made it the default recommendation - and it doesn't slow down when you stack LoRAs the way GGUF does. On a 40-series card, fp8_e4m3fn_fast is the interesting one: fp8 with optimizations enabled, the per-node version of the native fp8 compute path ComfyUI's --fast flag opens up globally. fp8_e5m2 exists for completeness; e4m3fn is what diffusion tooling means by fp8, so you'll rarely touch it.

    One trap: those three entries only appear if your PyTorch build has the dtype. On an old or CPU-only torch the dropdown shows default and nothing else, and people reasonably conclude the node is broken. It isn't - your torch is just too old for fp8.

    Installing it

    Via ComfyUI Manager, search ComfyUI-Model-Visual-Loader - it's on the Comfy registry, currently 2.1.1. Or do it by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/a63976659/ComfyUI-Model-Visual-Loader.git
    # restart ComfyUI
    

    Dependencies are short: Pillow for thumbnails, plus aiohttp for the image routes, which your ComfyUI server already has. No model downloads, no VRAM cost - the pack only indexes files and serves pre-scaled previews.

    Heads up: the author is Chinese, the UI is in Chinese, and the node lives under the 💝可视化加载器 category. UNET名称 is the file, 权重类型 is the precision.

    Making the thumbnails appear

    The pack looks for an image next to the model file with the same base name - flux1-dev-fp8.safetensors gets flux1-dev-fp8.png (.jpg, .jpeg, .webp also work). First scan squeezes it to a 512px thumbnail inside the pack's own cached_images folder, reused forever and regenerated only if the source changed. Same-name .txt files are notes: the buttons under the grid read and write them, which is a decent home for trigger words.

    Where people get burned

    • A model you just downloaded isn't in the list. The picker fetches the model list once per page load and caches it in the browser, so a file dropped in mid-session won't show up until you refresh the tab.
    • No preview on a model that has one. The basename has to match exactly, extension aside, and the image must live in the same folder as the weights.
    • GGUF and NF4 files. The node's description mentions quantized models, and GGUF files will show up in the picker if you've installed city96's GGUF pack - but this node loads through ComfyUI's plain diffusion-model path, not a quantized one. Use that pack's own loader for GGUF. Here, 权重类型 means the fp8 cast and nothing else.
    • A blank grid or widgets you can't open. These visual loaders are DOM widgets bolted onto the canvas, the exact class of node ComfyUI's Nodes 2.0 frontend has broken before - rgthree's Power Lora Loader hit the same wall, with its maintainer confirming the new rendering caused "many problems" for DOM-heavy nodes. Grid renders empty, properties won't open? Go back to the legacy canvas first.
    Category💝可视化加载器

    Inputs (2)

    NameTypeDefaultDescription
    UNET名称COMBO0 options:
    权重类型COMBO4 options: default, fp8_e4m3fn, fp8_e4m3fn_fast, fp8_e5m2

    Outputs (1)

    NameTypeDescription
    模型MODEL