Nodes/Quality of Life Nodes for ComfyUI/Checkpoint Enum Switch 10X (Soze)
ComfyUI Node

Checkpoint Enum Switch 10X (Soze)

Ten checkpoints, one string key, zero wasted VRAM

By SozeInc·Created 2 years ago·Updated 8 days ago· 10
Checkpoint Enum Switch 10X (Soze)
    • MODEL
    • CLIP
    • VAE
    • model_name
    • matched_index
    • status
    enum_value
    case_sensitivefalse
    strip_whitespacetrue
    default_model
    compare_text_1
    model_1
    compare_text_2
    model_2
    compare_text_3
    model_3
    compare_text_4
    model_4
    compare_text_5
    model_5
    compare_text_6
    model_6
    compare_text_7
    model_7
    compare_text_8
    model_8
    compare_text_9
    model_9
    compare_text_10
    model_10
    allow_nonefalse

    The usual way to swap checkpoints mid-workflow is a pile of loader nodes feeding a switch, which means every checkpoint you're "not using" is still sitting in VRAM. Checkpoint Enum Switch 10X inverts that: ten checkpoint slots, one string key, and only the matching model is ever loaded. The rest are just names in dropdowns - they never touch your GPU.

    It's the checkpoint variant of Soze's enum-switch family (there are siblings for LoRAs, diffusion models and upscale models, all sharing the same matching logic and the same 10X shape). If you've ever wanted a CSV column or a text input to decide which checkpoint runs, this is the node that makes it painless.

    How it works

    You get enum_value (the key) and ten (compare_text_N, model_N) pairs. The node compares the key against each label - case-insensitive and whitespace-trimmed by default, first match wins - and loads only the checkpoint in the winning slot. default_model loads when nothing matches. Blank labels are skipped, so unused slots can't accidentally fire.

    Two helpers make it usable rather than tedious:

    • A "Copy Names to Compare Text" button (added by the pack's JS) fills every compare_text_N with the base filename of the model you picked in that slot, and copies a JSON array of those names to your clipboard. Paste that array into an enum_value source elsewhere in the graph and the whole lookup works.
    • allow_none: flip it on and an enum_value of "none" - the first item in that copied array - skips loading entirely. The loader outputs nothing for that run. Handy when one row of your CSV means "no checkpoint change."

    Outputs: MODEL, CLIP, VAE (the classic triple, ready for a sampler and CLIP text encode), plus model_name (which checkpoint actually loaded - wire this into your filename or a text log), matched_index, and status.

    When it's worth it

    Drive it from the pack's CSV Reader or CSV Random Reader: a prompt file where every row names its own checkpoint, and this node routes the right one in. Or use it as a tidy A/B test rig - enum_value flips between two labels, only one model in VRAM at a time, and model_name tells you which one produced the output. If you're mainly hand-selecting in the UI and never change mid-run, the built-in CheckpointLoaderSimple is honestly fine - this earns its keep the moment a string decides the model.

    Installing it

    Standard for the pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/SozeInc/ComfyUI_Soze.git
    pip install -r ComfyUI_Soze/requirements.txt
    

    Or via ComfyUI Manager ("ComfyUI_Soze") and restart. No extra model files - it loads whatever's already in your models/checkpoints folder. If your dropdowns look empty, that's a checkpoint-folder problem, not a node problem: drop .safetensors files into models/checkpoints and refresh.

    One trap: the model dropdowns live in the optional section, so if you collapse the node you may not see them. Leave it expanded while you're wiring the ten slots, and remember blank model dropdowns mean "unused."

    Categoryloaders

    Inputs (25)

    NameTypeDefaultDescription
    enum_valueSTRINGString to match against each compare_text_N.
    case_sensitiveoptBOOLEANfalseIf True, 'A' != 'a'.
    strip_whitespaceoptBOOLEANtrueTrim whitespace before comparing.
    default_modeloptCOMBOLoaded when no compare_text_N matches enum_value. Blank = none.
    compare_text_1optSTRINGCase 1 label. Blank = skip this case.
    model_1optCOMBOModel loaded when compare_text_1 matches enum_value. Blank = unused.
    compare_text_2optSTRINGCase 2 label. Blank = skip this case.
    model_2optCOMBOModel loaded when compare_text_2 matches enum_value. Blank = unused.
    compare_text_3optSTRINGCase 3 label. Blank = skip this case.
    model_3optCOMBOModel loaded when compare_text_3 matches enum_value. Blank = unused.
    compare_text_4optSTRINGCase 4 label. Blank = skip this case.
    model_4optCOMBOModel loaded when compare_text_4 matches enum_value. Blank = unused.
    compare_text_5optSTRINGCase 5 label. Blank = skip this case.
    model_5optCOMBOModel loaded when compare_text_5 matches enum_value. Blank = unused.
    compare_text_6optSTRINGCase 6 label. Blank = skip this case.
    model_6optCOMBOModel loaded when compare_text_6 matches enum_value. Blank = unused.
    compare_text_7optSTRINGCase 7 label. Blank = skip this case.
    model_7optCOMBOModel loaded when compare_text_7 matches enum_value. Blank = unused.
    compare_text_8optSTRINGCase 8 label. Blank = skip this case.
    model_8optCOMBOModel loaded when compare_text_8 matches enum_value. Blank = unused.
    compare_text_9optSTRINGCase 9 label. Blank = skip this case.
    model_9optCOMBOModel loaded when compare_text_9 matches enum_value. Blank = unused.
    compare_text_10optSTRINGCase 10 label. Blank = skip this case.
    model_10optCOMBOModel loaded when compare_text_10 matches enum_value. Blank = unused.
    allow_noneoptBOOLEANfalseIf enabled, an enum_value of 'none' (the first item in the copied compare-text array) skips loading: the LoRA loader passes (model, clip) through unchanged; the other loaders output nothing for that run.

    Outputs (6)

    NameTypeDescription
    MODELMODEL
    CLIPCLIP
    VAEVAE
    model_nameSTRING
    matched_indexINT
    statusSTRING