Nodes/NH-Nodes/Load Clip Index (NH)
ComfyUI Node

Load Clip Index (NH)

Load one of 64 CLIPs by number, and stop dragging dropdowns

By jetthuangai·Created 6 months ago·Updated about a month ago· 7
Load Clip Index (NH)
    • clip
    • filename
    • index
    ◄select_modeindex►
    ◄type▾►
    ◄index1►
    ◄clip_count5►
    ◄clip_1▾►
    ◄enable_1false►
    ◄clip_2▾►
    ◄enable_2false►
    ◄clip_3▾►
    ◄enable_3false►
    ◄clip_4▾►
    ◄enable_4false►
    ◄clip_5▾►
    ◄enable_5false►
    ◄clip_6▾►
    ◄enable_6false►
    ◄clip_7▾►
    ◄enable_7false►
    ◄clip_8▾►
    ◄enable_8false►
    ◄clip_9▾►
    ◄enable_9false►
    ◄clip_10▾►
    ◄enable_10false►
    ◄clip_11▾►
    ◄enable_11false►
    ◄clip_12▾►
    ◄enable_12false►
    ◄clip_13▾►
    ◄enable_13false►
    ◄clip_14▾►
    ◄enable_14false►
    ◄clip_15▾►
    ◄enable_15false►
    ◄clip_16▾►
    ◄enable_16false►
    ◄clip_17▾►
    ◄enable_17false►
    ◄clip_18▾►
    ◄enable_18false►
    ◄clip_19▾►
    ◄enable_19false►
    ◄clip_20▾►
    ◄enable_20false►
    ◄clip_21▾►
    ◄enable_21false►
    ◄clip_22▾►
    ◄enable_22false►
    ◄clip_23▾►
    ◄enable_23false►
    ◄clip_24▾►
    ◄enable_24false►
    ◄clip_25▾►
    ◄enable_25false►
    ◄clip_26▾►
    ◄enable_26false►
    ◄clip_27▾►
    ◄enable_27false►
    ◄clip_28▾►
    ◄enable_28false►
    ◄clip_29▾►
    ◄enable_29false►
    ◄clip_30▾►
    ◄enable_30false►
    ◄clip_31▾►
    ◄enable_31false►
    ◄clip_32▾►
    ◄enable_32false►
    ◄clip_33▾►
    ◄enable_33false►
    ◄clip_34▾►
    ◄enable_34false►
    ◄clip_35▾►
    ◄enable_35false►
    ◄clip_36▾►
    ◄enable_36false►
    ◄clip_37▾►
    ◄enable_37false►
    ◄clip_38▾►
    ◄enable_38false►
    ◄clip_39▾►
    ◄enable_39false►
    ◄clip_40▾►
    ◄enable_40false►
    ◄clip_41▾►
    ◄enable_41false►
    ◄clip_42▾►
    ◄enable_42false►
    ◄clip_43▾►
    ◄enable_43false►
    ◄clip_44▾►
    ◄enable_44false►
    ◄clip_45▾►
    ◄enable_45false►
    ◄clip_46▾►
    ◄enable_46false►
    ◄clip_47▾►
    ◄enable_47false►
    ◄clip_48▾►
    ◄enable_48false►
    ◄clip_49▾►
    ◄enable_49false►
    ◄clip_50▾►
    ◄enable_50false►
    ◄clip_51▾►
    ◄enable_51false►
    ◄clip_52▾►
    ◄enable_52false►
    ◄clip_53▾►
    ◄enable_53false►
    ◄clip_54▾►
    ◄enable_54false►
    ◄clip_55▾►
    ◄enable_55false►
    ◄clip_56▾►
    ◄enable_56false►
    ◄clip_57▾►
    ◄enable_57false►
    ◄clip_58▾►
    ◄enable_58false►
    ◄clip_59▾►
    ◄enable_59false►
    ◄clip_60▾►
    ◄enable_60false►
    ◄clip_61▾►
    ◄enable_61false►
    ◄clip_62▾►
    ◄enable_62false►
    ◄clip_63▾►
    ◄enable_63false►
    ◄clip_64▾►
    ◄enable_64false►

    Every text encoder has its own CLIP model, and if you run multiple model families you end up with a lot of .safetensors files in models/clip and a lot of scrolling through dropdowns. Load Clip Index (NH) turns that dropdown into a number: it lists up to 64 CLIP files in one node, and you pick one by a 1-based index. Hand the index to a Counter (NH), a random node, or a math node, and the loader swaps CLIPs automatically between runs.

    It's the same idea as the pack's indexed LoRA and diffusion loaders - one big config surface, one wire that chooses. You pay a little setup time up front; you save a lot of manual swapping later.

    How it works

    The node reads every file in ComfyUI's models/clip folder and lays them out as clip_1 through clip_64 inputs. Two controls shape the selection:

    • select_mode - index picks by the index widget; boolean ignores the number and picks the first enable_N checkbox you've ticked. Boolean mode is the lazy person's toggle: flip the enable box on the CLIP you want this run, and the loader follows.
    • clip_count - how many of the 64 slots are active (so you only see the ones you've actually populated). Set it to your real count and the rest disappear.
    • type - which CLIP architecture to load: stable_diffusion, stable_cascade, sd3, stable_audio, mochi, ltxv, pixart, or hunyuan_video. Get this wrong and the load fails or produces garbage, so match it to the checkpoint family you're pairing with.

    The loader uses ComfyUI's standard load_clip path with your models/embeddings folder attached, so your text encoders behave exactly like the built-in Load CLIP node.

    Outputs

    • clip - the loaded CLIP, ready to wire into a CLIP Text Encode node.
    • filename - the name of the file that got loaded. Great for logging or for a Save Image caption showing which CLIP produced the result.
    • index - the index that was selected, passed back out so downstream nodes know what happened.

    If the selected slot is empty or out of range, you get a blocked output instead of a crash - downstream text encoding simply doesn't run. That's the safe-fail behavior, and it's usually what you want while you're still populating slots.

    Installing

    cd ComfyUI/custom_nodes
    git clone https://github.com/jetthuangai/NH-Nodes.git
    cd NH-Nodes
    pip install -r requirements.txt
    

    Or install NH-Nodes via ComfyUI Manager and restart. No model downloads - the node just reads whatever CLIPs you already have. First run will show empty dropdowns until you assign files to slots, which trips people up for about ten seconds.

    CategoryNH-Nodes/Loaders

    Inputs (132)

    NameTypeDefaultDescription
    select_modeCOMBOindex2 options: index, boolean
    typeCOMBO8 options: stable_diffusion, stable_cascade, sd3, stable_audio, mochi, ltxv, +2
    indexINT11–64—
    clip_countINT51–64—
    clip_1optCOMBO1 options:
    enable_1optBOOLEANfalse—
    clip_2optCOMBO1 options:
    enable_2optBOOLEANfalse—
    clip_3optCOMBO1 options:
    enable_3optBOOLEANfalse—
    clip_4optCOMBO1 options:
    enable_4optBOOLEANfalse—
    clip_5optCOMBO1 options:
    enable_5optBOOLEANfalse—
    clip_6optCOMBO1 options:
    enable_6optBOOLEANfalse—
    clip_7optCOMBO1 options:
    enable_7optBOOLEANfalse—
    clip_8optCOMBO1 options:
    enable_8optBOOLEANfalse—
    clip_9optCOMBO1 options:
    enable_9optBOOLEANfalse—
    clip_10optCOMBO1 options:
    enable_10optBOOLEANfalse—
    clip_11optCOMBO1 options:
    enable_11optBOOLEANfalse—
    clip_12optCOMBO1 options:
    enable_12optBOOLEANfalse—
    clip_13optCOMBO1 options:
    enable_13optBOOLEANfalse—
    clip_14optCOMBO1 options:
    enable_14optBOOLEANfalse—
    clip_15optCOMBO1 options:
    enable_15optBOOLEANfalse—
    clip_16optCOMBO1 options:
    enable_16optBOOLEANfalse—
    clip_17optCOMBO1 options:
    enable_17optBOOLEANfalse—
    clip_18optCOMBO1 options:
    enable_18optBOOLEANfalse—
    clip_19optCOMBO1 options:
    enable_19optBOOLEANfalse—
    clip_20optCOMBO1 options:
    enable_20optBOOLEANfalse—
    clip_21optCOMBO1 options:
    enable_21optBOOLEANfalse—
    clip_22optCOMBO1 options:
    enable_22optBOOLEANfalse—
    clip_23optCOMBO1 options:
    enable_23optBOOLEANfalse—
    clip_24optCOMBO1 options:
    enable_24optBOOLEANfalse—
    clip_25optCOMBO1 options:
    enable_25optBOOLEANfalse—
    clip_26optCOMBO1 options:
    enable_26optBOOLEANfalse—
    clip_27optCOMBO1 options:
    enable_27optBOOLEANfalse—
    clip_28optCOMBO1 options:
    enable_28optBOOLEANfalse—
    clip_29optCOMBO1 options:
    enable_29optBOOLEANfalse—
    clip_30optCOMBO1 options:
    enable_30optBOOLEANfalse—
    clip_31optCOMBO1 options:
    enable_31optBOOLEANfalse—
    clip_32optCOMBO1 options:
    enable_32optBOOLEANfalse—
    clip_33optCOMBO1 options:
    enable_33optBOOLEANfalse—
    clip_34optCOMBO1 options:
    enable_34optBOOLEANfalse—
    clip_35optCOMBO1 options:
    enable_35optBOOLEANfalse—
    clip_36optCOMBO1 options:
    enable_36optBOOLEANfalse—
    clip_37optCOMBO1 options:
    enable_37optBOOLEANfalse—
    clip_38optCOMBO1 options:
    enable_38optBOOLEANfalse—
    clip_39optCOMBO1 options:
    enable_39optBOOLEANfalse—
    clip_40optCOMBO1 options:
    enable_40optBOOLEANfalse—
    clip_41optCOMBO1 options:
    enable_41optBOOLEANfalse—
    clip_42optCOMBO1 options:
    enable_42optBOOLEANfalse—
    clip_43optCOMBO1 options:
    enable_43optBOOLEANfalse—
    clip_44optCOMBO1 options:
    enable_44optBOOLEANfalse—
    clip_45optCOMBO1 options:
    enable_45optBOOLEANfalse—
    clip_46optCOMBO1 options:
    enable_46optBOOLEANfalse—
    clip_47optCOMBO1 options:
    enable_47optBOOLEANfalse—
    clip_48optCOMBO1 options:
    enable_48optBOOLEANfalse—
    clip_49optCOMBO1 options:
    enable_49optBOOLEANfalse—
    clip_50optCOMBO1 options:
    enable_50optBOOLEANfalse—
    clip_51optCOMBO1 options:
    enable_51optBOOLEANfalse—
    clip_52optCOMBO1 options:
    enable_52optBOOLEANfalse—
    clip_53optCOMBO1 options:
    enable_53optBOOLEANfalse—
    clip_54optCOMBO1 options:
    enable_54optBOOLEANfalse—
    clip_55optCOMBO1 options:
    enable_55optBOOLEANfalse—
    clip_56optCOMBO1 options:
    enable_56optBOOLEANfalse—
    clip_57optCOMBO1 options:
    enable_57optBOOLEANfalse—
    clip_58optCOMBO1 options:
    enable_58optBOOLEANfalse—
    clip_59optCOMBO1 options:
    enable_59optBOOLEANfalse—
    clip_60optCOMBO1 options:
    enable_60optBOOLEANfalse—
    clip_61optCOMBO1 options:
    enable_61optBOOLEANfalse—
    clip_62optCOMBO1 options:
    enable_62optBOOLEANfalse—
    clip_63optCOMBO1 options:
    enable_63optBOOLEANfalse—
    clip_64optCOMBO1 options:
    enable_64optBOOLEANfalse—

    Outputs (3)

    NameTypeDescription
    clipCLIP—
    filenameSTRING—
    indexINT—