Nodes/Suplex Misc ComfyUI Nodes/Diffusers Selector
ComfyUI Node

Diffusers Selector

A dropdown of every diffusers-format model on your disk

By saftle·Created 2 years ago·Updated 8 months ago· 3
Diffusers Selector
    • model_path
    model_path

    Most of the models you download for ComfyUI are single .safetensors checkpoint files. But the diffusers ecosystem - Hugging Face's standard, and the format many training and merge tools produce - ships models as folders full of files, identified by a model_index.json in the root. If you work with those, you've met the annoyance Diffusers Selector fixes: there's no stock dropdown for "which diffusers folder do I want."

    That's this node's whole job. It walks your models/diffusers directories, finds every folder containing a model_index.json, and gives you a dropdown of them. Select one and you get back its path - as a string, with zero weight loading. No model is read into memory, no VRAM touched. It's a path pass-through for anything downstream that consumes a diffusers path: custom loaders, merge nodes, or a script that assembles a diffusers pipeline.

    How it works

    The implementation walks each configured diffusers root and collects every directory that has a model_index.json inside it:

    for root, subdirs, files in os.walk(search_path, followlinks=True):
        if "model_index.json" in files:
            paths.append(os.path.relpath(root, start=search_path))
    

    So the dropdown is built from what's actually on disk, and what you select is returned as the relative path. Simple, deterministic, and it means a half-downloaded folder simply won't show up until it's complete.

    Inputs and output

    • model_path - the dropdown of diffusers-format folders found under your models/diffusers roots.
    • Output: model_path - the chosen relative path as a string.

    (The schema shows the output typed against a default path like /tmp/ComfyUI/models/diffusers - that's just ComfyUI recording the folder type; your own install's diffusers path is what gets used.)

    The one thing people trip on

    It only sees diffusers-format folders. A lone .safetensors in your checkpoints folder will never appear, and that's not a bug - if you need a single-file checkpoint name, that's a different selector. Also, if your diffusers models live somewhere unusual, make sure that path is registered in ComfyUI's extra_model_paths.yaml; the node only sees folders on ComfyUI's configured search roots. And since the list is built when the node creates, drop new model folders in before adding the node (or refresh) or they won't show.

    Install

    Same as every node in this pack: ComfyUI Manager → search "uber_comfy_nodes" ("Suplex Misc ComfyUI Nodes") → install → restart. Or clone it:

    cd ComfyUI/custom_nodes
    git clone https://github.com/saftle/uber_comfy_nodes
    

    Restart ComfyUI and look under Uber Comfy. Requirements are light - Pillow, numpy, psutil, pynvml - and nothing gets downloaded model-wise.

    CategoryUber Comfy

    Inputs (1)

    NameTypeDefaultDescription
    model_pathCOMBO0 options:

    Outputs (1)

    NameTypeDescription
    model_path/tmp/ComfyUI/models/diffusers