Nodes/SP-Nodes/SP_XYValues
ComfyUI Node

SP_XYValues

Turn a block of text into a typed list

By bananasss00·Created 2 years ago·Updated 6 days ago· 20
SP_XYValues
    • values
    values
    type
    delimiter\n

    This is the node that actually builds the lists everything else in SP-Nodes' sweep tooling consumes - SP_XYGrid, SP_SelectItemFromAnyList, anything expecting a list input. If you're setting up a parameter sweep in this pack, SP_XYValues is usually where it starts.

    What it does

    One multiline text box, values, where you type or paste your entries. A type dropdown with four options - int, float, bool, string - tells the node how to interpret each entry. And a delimiter field, defaulting to \n (newline), controls how the block gets split. The single output, values, is a list, cast to whichever type you picked.

    So in practice: type 20\n30\n40 into the text box with type set to int and the default newline delimiter, and you get a list of three integers - ready to feed a steps parameter across a sweep. Switch the delimiter to a comma and you can write 1.0, 1.5, 2.0 on one line instead of one value per line, if that's easier to read for your case.

    The fields that actually matter

    • values - your raw entries, one per delimiter-separated chunk.
    • type - pick the type that matches what you're feeding downstream. A steps or seed value wants int; CFG or denoise strength wants float; a checkpoint name or sampler name wants string.
    • delimiter - newline by default, which is the natural choice for a multiline box, but change it if your data's more comfortable on one line.

    Where it fits

    Pair it with SP_XYGrid to build a two-axis sweep, or with SP_SelectItemFromAnyList if you just want to pull one specific entry out of a list you've defined this way rather than sweep across the whole thing. It's also just a convenient way to define any list of typed values without wiring up several separate single-value widgets - useful any time you want to try a handful of settings without editing the graph each time.

    Installing it

    Ships with the SP-Nodes pack:

    • ComfyUI Manager: search "SP-Nodes", install, restart.
    • Manual: cd ComfyUI/custom_nodes && git clone https://github.com/bananasss00/ComfyUI-SP-Nodes, restart ComfyUI.

    No models, no dependencies - plain text parsing.

    Troubleshooting

    If a downstream node rejects the list with a type error, the usual culprit is a type selection that doesn't match what's actually in your text - picking int while one line has a stray decimal point, or bool with anything other than clean true/false-style values, will produce entries the parser can't cleanly cast. Double check every line against the type you picked before assuming the problem is downstream. And if your list came back with fewer entries than you typed, check for a blank trailing line or a mismatched delimiter - an empty final line after your last newline can show up as an extra, empty entry rather than being silently dropped, depending on how the split is implemented.

    CategorySP-Nodes

    Inputs (3)

    NameTypeDefaultDescription
    valuesSTRING
    typeCOMBO4 options: int, float, bool, string
    delimiterSTRING\n

    Outputs (1)

    NameTypeDescription
    values*