Nodes/Comfyui_LG_Tools/🎈ComboSetter
ComfyUI Node

🎈ComboSetter

A prompt picker you actually read, not a dropdown full of seeds

By LAOGOU-666·Created 2 years ago·Updated 7 months ago· 369
🎈ComboSetter
    • selected_label
    • selected_prompt
    labels
    prompts
    selected

    ComboSetter (🎈ComboSetter) solves a small but real annoyance: a ComfyUI graph where you keep swapping one value between a few known options. You've got a list of styles, subjects, or LoRA trigger phrases, and instead of hunting through a dropdown or editing a text node every run, you want a clean menu: pick a label, get the matching value out.

    It's essentially a tiny lookup table with a frontend-friendly selector. You type a list of labels, a matching list of values, and tell it which label is selected - it returns the selected label and the value that goes with it. The frontend turns selected into a dropdown you can click through live, which is the part that makes it feel like a proper preset picker rather than another text field.

    The inputs that matter

    • labels (STRING, multiline) - one label per line. These are the human-readable names in your selector: cyberpunk, watercolor, black and white.
    • prompts (STRING, multiline) - one value per line, in the same order. This is what actually gets routed downstream: the prompt text, a seed, a file path - anything that's a string.
    • selected (STRING) - the currently chosen label. The dropdown UI writes to this; you can also set it directly.

    Outputs are selected_label and selected_prompt - the label you picked and its paired value. The pairing is purely positional (line N of labels ↔ line N of prompts), so keep the two lists in sync. If the selected label has no matching prompt line, you get an empty prompt rather than an error - worth knowing when you're debugging a blank.

    How it works

    The Python is delightfully simple: split both strings on newlines, find selected in the labels, return it plus the prompt at the same index. No state, no caching, deterministic every time. All the interactivity - the dropdown, the click-through behavior - is frontend JS in the pack's web folder, which is why the node feels "native" in the UI even though it's doing almost nothing on the backend.

    Installing it

    Part of Comfyui_LG_Tools:

    cd ComfyUI/custom_nodes
    git clone https://github.com/LAOGOU-666/Comfyui_LG_Tools.git
    pip install -r requirements.txt
    

    Or via ComfyUI Manager → "Comfyui_LG_Tools" → restart. It's under Add Node → 🎈LAOGOU → Utils.

    Common issues

    • "The dropdown shows nothing." The frontend selector needs labels to be populated with at least one line before it has anything to list. It's also possible you're on a frontend version where the custom widget misbehaves - the pack's UI is Chinese-first and targets the legacy canvas.
    • "Wrong value comes out." Off-by-one between labels and prompts - a stray blank line shifts every pairing. Trim the lists and count the lines.
    • "Blank prompt." Selected label exists but there's no corresponding prompt line. Add it.

    It's a convenience node, not a workhorse - but the moment you're cycling three prompt variants by hand, the dropdown it adds to your graph saves more time than its size suggests.

    Category🎈LAOGOU/Utils

    Inputs (3)

    NameTypeDefaultDescription
    labelsSTRING
    promptsSTRING
    selectedSTRING

    Outputs (2)

    NameTypeDescription
    selected_labelSTRING
    selected_promptSTRING