Nodes/ComfyUI-Xz3r0-Nodes/XPrimitiveCombo
ComfyUI Node

XPrimitiveCombo

Turn any dropdown into a string you can save or pass along

By Xz3r0-M·Created 8 months ago·Updated about 9 hours ago· 13
XPrimitiveCombo
    • COMBO
    • STRING
    combo_string

    ComfyUI's dropdowns are famously hard to feed into other nodes. A sampler's scheduler combo, a model loader's choice of variant - those are widget values, not wire values, so you can't easily save them, compare them, or pass them downstream as text. XPrimitiveCombo is the workaround: it bridges to any node's COMBO widget, keeps the selection in sync, and exposes it as a STRING output you can actually wire somewhere.

    How it works

    It behaves like ComfyUI's Primitive node, but aimed at combo widgets instead of plain numbers and strings. Two outputs:

    • COMBO - a wildcard output you connect to a target node's dropdown widget. Once connected, the frontend builds a matching control on this node, and the two stay synced: change it here and the target widget changes, and vice versa.
    • STRING - the currently selected value as plain text, for whatever wants it downstream.

    The mechanism is a hidden combo_string input widget that the frontend writes to on every selection change, and the Python backend reads it back out to produce the outputs. So it's genuinely "the dropdown, but as a wire."

    The inputs that matter

    The only schema-level input is combo_string, which is internal and marked as such - you don't touch it. The real "input" is the connection you make from the COMBO output to a target node's dropdown. Wire that first; everything else is reading the STRING out.

    Why you'd reach for it

    The use case from the pack's changelog is right: "when you want to save the option as a string or pass it to other nodes." Filename suffixes are the classic - you set a combo to pick a sampler or a quality tier, and you want that choice to appear in the output filename or in workflow metadata without typing it twice. It also enables the nicer pattern of deciding a combo selection from another node rather than clicking it by hand.

    Installing it

    XPrimitiveCombo ships in ComfyUI-Xz3r0-Nodes (by Xz3r0-M) under ♾️ Xz3r0/Workflow-Processing. ComfyUI Manager: search ComfyUI-Xz3r0-Nodes and install. Manual:

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

    Restart ComfyUI after. No models, no heavy deps. It's frontend-driven, so a stale ComfyUI build is the most likely source of weird behavior - the syncing control comes from the pack's web extension.

    Gotchas

    The COMBO output only accepts connections into combo widgets - that's deliberate, the wildcard is narrowed on the frontend to combo ports, so don't expect it to feed arbitrary inputs. And because the value lives in a hidden widget, a workflow saved mid-sync should reload fine, but if the control looks wrong after an upgrade, reconnect the COMBO output once to rebuild it. It's a small node with a narrow job, and it does that job well.

    Category♾️ Xz3r0/Workflow-Processing

    Inputs (1)

    NameTypeDefaultDescription
    combo_stringSTRINGInternal: synced from target widget selection

    Outputs (2)

    NameTypeDescription
    COMBO*Connect to a target node's COMBO widget to pass the selected value
    STRINGSTRINGThe selected widget value as a string