Nodes/Simple String Repository/Simple String Repository Compact (IO)
ComfyUI Node

Simple String Repository Compact (IO)

Same tag picker, but each slot is one packed string like '2,1.2,-1'

By IgalOgonov·Created 2 years ago·Updated 2 years ago· 3
Simple String Repository Compact (IO)
    • parsed_string
    string
    delimiter
    target10,1,-1
    target20,1,-1
    target30,1,-1
    target40,1,-1
    target50,1,-1

    SimpleStringRepositoryCompact is the packed-string version of the family's five-slot node. Where the regular SimpleStringRepository gives every selection slot three separate widgets (target, strength, random), this one shoves all three into a single text field in index,strength,random order. Same collection-of-tags-in-a-text-box idea, one output string, a third of the widgets.

    The trade-off is exactly what the README says: the Compact variant is more comfortable when you set everything by hand, and worse when you're automating. The full mechanism and install walkthrough are on the base Simple String Repository page - this page is about the packed format and why it catches people out.

    The format

    Each targetN field is a comma-separated string. Position one is the entry index, position two is the strength, position three is the random selector:

    2,1.2,-1
    

    means "entry 2, at weight 1.2, pick the random option." Omit the optional parts and defaults kick in - 2 alone means target 2, strength 1, random -1. That's the compact superpower: one glance at the field tells you everything about that slot, and on-screen the node is a fraction of the height of its regular sibling.

    The gotcha that will bite you first

    The default value on every targetN is 0,1,-1 - target index 0. But unless your collection explicitly numbers a line 0.something, entries get 1-based line numbers at runtime. So a freshly added Compact node with a normal unindexed list selects nothing and the output is empty. It's not broken; the default target just doesn't exist. Set the first field to 1,1,-1 (or whatever your first real entry is) and you'll see output immediately.

    It's also worth knowing the node's "Reset Target Parameters" button resets every slot back to that same 0,1,-1, so clicking it gives you a blank output until you re-enter your targets. Mildly annoying, but predictable.

    Why "worse for automation" is real

    Feeding this node from other nodes is awkward. The regular version takes plain INT and FLOAT widgets you can drive with converters and primitive nodes; here the whole selection is one text string, so a script or another node has to serialize index,strength,random for you. For a hand-operated prompt builder that's fine. For a workflow you've wired up to compute selections, the regular node is the better fit. Pick the Compact when you're the one at the keyboard.

    Install

    ComfyUI Manager (search "Simple String Repository") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/IgalOgonov/ComfyUI_Simple_String_Repository
    

    Restart ComfyUI. No requirements file, no models - plain Python plus a small JS extension.

    Other things to remember

    The family's parser quirks still apply: dots in entries break them (truncation, or a ValueError on unindexed lines with dots), and duplicate indexes shadow everything after the first. And since it's an output node that never caches, any random at -1 re-rolls each queue run. If you're picking a compact for the clean canvas, keep your indexes tidy with the "Add Missing Indexes" button and the packed format stays genuinely pleasant to use.

    Categoryutils

    Inputs (7)

    NameTypeDefaultDescription
    stringSTRING
    delimiterCOMBO2 options: ,,
    target1optSTRING0,1,-1
    target2optSTRING0,1,-1
    target3optSTRING0,1,-1
    target4optSTRING0,1,-1
    target5optSTRING0,1,-1

    Outputs (1)

    NameTypeDescription
    parsed_stringSTRING