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

Load VAE Index (NH)

One loader, up to 64 VAEs, picked by a single number

By jetthuangai·Created 5 months ago·Updated 21 days ago· 6
Load VAE Index (NH)
    • vae
    • filename
    • index
    select_modeindex
    index1
    vae_count5
    vae_1
    enable_1false
    vae_2
    enable_2false
    vae_3
    enable_3false
    vae_4
    enable_4false
    vae_5
    enable_5false
    vae_6
    enable_6false
    vae_7
    enable_7false
    vae_8
    enable_8false
    vae_9
    enable_9false
    vae_10
    enable_10false
    vae_11
    enable_11false
    vae_12
    enable_12false
    vae_13
    enable_13false
    vae_14
    enable_14false
    vae_15
    enable_15false
    vae_16
    enable_16false
    vae_17
    enable_17false
    vae_18
    enable_18false
    vae_19
    enable_19false
    vae_20
    enable_20false
    vae_21
    enable_21false
    vae_22
    enable_22false
    vae_23
    enable_23false
    vae_24
    enable_24false
    vae_25
    enable_25false
    vae_26
    enable_26false
    vae_27
    enable_27false
    vae_28
    enable_28false
    vae_29
    enable_29false
    vae_30
    enable_30false
    vae_31
    enable_31false
    vae_32
    enable_32false
    vae_33
    enable_33false
    vae_34
    enable_34false
    vae_35
    enable_35false
    vae_36
    enable_36false
    vae_37
    enable_37false
    vae_38
    enable_38false
    vae_39
    enable_39false
    vae_40
    enable_40false
    vae_41
    enable_41false
    vae_42
    enable_42false
    vae_43
    enable_43false
    vae_44
    enable_44false
    vae_45
    enable_45false
    vae_46
    enable_46false
    vae_47
    enable_47false
    vae_48
    enable_48false
    vae_49
    enable_49false
    vae_50
    enable_50false
    vae_51
    enable_51false
    vae_52
    enable_52false
    vae_53
    enable_53false
    vae_54
    enable_54false
    vae_55
    enable_55false
    vae_56
    enable_56false
    vae_57
    enable_57false
    vae_58
    enable_58false
    vae_59
    enable_59false
    vae_60
    enable_60false
    vae_61
    enable_61false
    vae_62
    enable_62false
    vae_63
    enable_63false
    vae_64
    enable_64false

    Load VAE Index (NH) is the VAE-flavored member of the pack's "indexed loaders" family: instead of one loader node per VAE, you get one node with a long menu of VAE slots and a number that decides which one actually loads. It's built for the same reason as the pack's LoRA and CLIP index nodes - big, configurable workflows where you'd rather flip an index than rewire a graph.

    Here's the shape of it. You set vae_count (how many slots you care about, default 5, up to 64), fill in the corresponding vae_1 through vae_N dropdowns with actual VAEs from your models/vae folder, and then index picks which one loads. It reads directly from ComfyUI's VAE list, so anything you can load with the normal Load VAE node shows up in these dropdowns.

    How it works

    There are two selection modes via select_mode:

    • index (default) - load the VAE in slot N where N is the index value. This is the simple one.
    • boolean - instead of an index, each slot has an enable_N checkbox, and the first enabled slot wins. Handy if you want to flip between VAEs by ticking boxes rather than typing a number.

    The outputs are vae (the loaded VAE, wire it into a VAE Decode or VAE Encode), filename (the name of the VAE that loaded, great for logging or filenames), and index (which slot was actually used - useful in boolean mode when you didn't pick it yourself).

    The important mechanism is what happens when nothing loads: if the selected slot is empty, the node returns an execution blocker, which stops everything downstream of it from running. That's a feature, not a bug - it means an empty slot safely halts the branch instead of silently feeding a broken VAE into your decode.

    The traps

    Indexing is 1-based. Slot 1 is index 1, not 0. People trip on this constantly, and it matters because an out-of-range index (say 5 when vae_count is 3) just blocks execution - no error, no obvious clue.

    vae_count hides the rest. The dropdowns exist up to 64, but only the first vae_count slots are actually consulted. If you fill vae_7 but leave vae_count at 5, slot 7 is dead weight.

    Boolean mode needs a checkbox on. If none of the enable_N toggles are true, you get the same execution-blocking behavior. It's not a bug - it's how you keep a branch dormant until you want it.

    When it earns its place

    Honestly, for most people a normal Load VAE is the right tool. This node shines in a few specific setups: an A/B test rig where you want to swap decoders without touching the graph, a config-driven workflow where the VAE choice is data (say, picked by another logic node from an index), or a shared template where you don't want other users hunting for the right loader. Pair the index output with a Switch N (NH) or Value Match Index (NH) and the whole workflow can drive its own VAE selection.

    Install

    Part of NH-Nodes: ComfyUI Manager → search NH-Nodes → install → restart, or:

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

    No extra model downloads - the VAEs are whatever you already keep in ComfyUI/models/vae, and the node just needs the pack installed.

    CategoryNH-Nodes/Loaders

    Inputs (131)

    NameTypeDefaultDescription
    select_modeCOMBOindex2 options: index, boolean
    indexINT11–64
    vae_countINT51–64
    vae_1optCOMBO1 options:
    enable_1optBOOLEANfalse
    vae_2optCOMBO1 options:
    enable_2optBOOLEANfalse
    vae_3optCOMBO1 options:
    enable_3optBOOLEANfalse
    vae_4optCOMBO1 options:
    enable_4optBOOLEANfalse
    vae_5optCOMBO1 options:
    enable_5optBOOLEANfalse
    vae_6optCOMBO1 options:
    enable_6optBOOLEANfalse
    vae_7optCOMBO1 options:
    enable_7optBOOLEANfalse
    vae_8optCOMBO1 options:
    enable_8optBOOLEANfalse
    vae_9optCOMBO1 options:
    enable_9optBOOLEANfalse
    vae_10optCOMBO1 options:
    enable_10optBOOLEANfalse
    vae_11optCOMBO1 options:
    enable_11optBOOLEANfalse
    vae_12optCOMBO1 options:
    enable_12optBOOLEANfalse
    vae_13optCOMBO1 options:
    enable_13optBOOLEANfalse
    vae_14optCOMBO1 options:
    enable_14optBOOLEANfalse
    vae_15optCOMBO1 options:
    enable_15optBOOLEANfalse
    vae_16optCOMBO1 options:
    enable_16optBOOLEANfalse
    vae_17optCOMBO1 options:
    enable_17optBOOLEANfalse
    vae_18optCOMBO1 options:
    enable_18optBOOLEANfalse
    vae_19optCOMBO1 options:
    enable_19optBOOLEANfalse
    vae_20optCOMBO1 options:
    enable_20optBOOLEANfalse
    vae_21optCOMBO1 options:
    enable_21optBOOLEANfalse
    vae_22optCOMBO1 options:
    enable_22optBOOLEANfalse
    vae_23optCOMBO1 options:
    enable_23optBOOLEANfalse
    vae_24optCOMBO1 options:
    enable_24optBOOLEANfalse
    vae_25optCOMBO1 options:
    enable_25optBOOLEANfalse
    vae_26optCOMBO1 options:
    enable_26optBOOLEANfalse
    vae_27optCOMBO1 options:
    enable_27optBOOLEANfalse
    vae_28optCOMBO1 options:
    enable_28optBOOLEANfalse
    vae_29optCOMBO1 options:
    enable_29optBOOLEANfalse
    vae_30optCOMBO1 options:
    enable_30optBOOLEANfalse
    vae_31optCOMBO1 options:
    enable_31optBOOLEANfalse
    vae_32optCOMBO1 options:
    enable_32optBOOLEANfalse
    vae_33optCOMBO1 options:
    enable_33optBOOLEANfalse
    vae_34optCOMBO1 options:
    enable_34optBOOLEANfalse
    vae_35optCOMBO1 options:
    enable_35optBOOLEANfalse
    vae_36optCOMBO1 options:
    enable_36optBOOLEANfalse
    vae_37optCOMBO1 options:
    enable_37optBOOLEANfalse
    vae_38optCOMBO1 options:
    enable_38optBOOLEANfalse
    vae_39optCOMBO1 options:
    enable_39optBOOLEANfalse
    vae_40optCOMBO1 options:
    enable_40optBOOLEANfalse
    vae_41optCOMBO1 options:
    enable_41optBOOLEANfalse
    vae_42optCOMBO1 options:
    enable_42optBOOLEANfalse
    vae_43optCOMBO1 options:
    enable_43optBOOLEANfalse
    vae_44optCOMBO1 options:
    enable_44optBOOLEANfalse
    vae_45optCOMBO1 options:
    enable_45optBOOLEANfalse
    vae_46optCOMBO1 options:
    enable_46optBOOLEANfalse
    vae_47optCOMBO1 options:
    enable_47optBOOLEANfalse
    vae_48optCOMBO1 options:
    enable_48optBOOLEANfalse
    vae_49optCOMBO1 options:
    enable_49optBOOLEANfalse
    vae_50optCOMBO1 options:
    enable_50optBOOLEANfalse
    vae_51optCOMBO1 options:
    enable_51optBOOLEANfalse
    vae_52optCOMBO1 options:
    enable_52optBOOLEANfalse
    vae_53optCOMBO1 options:
    enable_53optBOOLEANfalse
    vae_54optCOMBO1 options:
    enable_54optBOOLEANfalse
    vae_55optCOMBO1 options:
    enable_55optBOOLEANfalse
    vae_56optCOMBO1 options:
    enable_56optBOOLEANfalse
    vae_57optCOMBO1 options:
    enable_57optBOOLEANfalse
    vae_58optCOMBO1 options:
    enable_58optBOOLEANfalse
    vae_59optCOMBO1 options:
    enable_59optBOOLEANfalse
    vae_60optCOMBO1 options:
    enable_60optBOOLEANfalse
    vae_61optCOMBO1 options:
    enable_61optBOOLEANfalse
    vae_62optCOMBO1 options:
    enable_62optBOOLEANfalse
    vae_63optCOMBO1 options:
    enable_63optBOOLEANfalse
    vae_64optCOMBO1 options:
    enable_64optBOOLEANfalse

    Outputs (3)

    NameTypeDescription
    vaeVAE
    filenameSTRING
    indexINT