Nodes/image_control/abyz22_path_generator
ComfyUI Node

abyz22_path_generator

Concatenate a number onto a path and call it done

By abyz22·Created 3 years ago·Updated 2 years ago· 17
abyz22_path_generator
    • Text
    basic_path
    start_num1

    This is the most honest node in the pack: it takes a string, adds a number to the end, and returns the result. abyz22_path_generator exists for batch-saving workflows where you want each output to land in a numbered folder - basic_path of C:/outputs/run_ and start_num of 7 gives you C:/outputs/run_7, and you increment the number per batch item to keep everything separate.

    It ships in abyz22/image_control, the Impact Pack fork. In a pack full of body editing and LaMa outpainting, this tiny string node is the batch-bookkeeping utility riding along, and it pairs with the pack's queue/save nodes for building numbered output runs.

    The two inputs

    • basic_path - a STRING, any prefix you want. Usually a directory path ending in a separator or prefix.
    • start_num (1–3000, default 1) - the number appended.

    Output is Text (STRING), which is literally basic_path + str(start_num) - a plain concatenation, no padding, no separators injected, no filesystem touching. The node never creates folders or writes anything; it's purely a string factory that other nodes consume.

    How it works

    The implementation is two lines: take the kwargs, join the string and the number, return it. There's genuinely nothing else - no leading-zero formatting, so run_007 requires you to include the zeros in basic_path yourself. If you need zero-padded numbering (which most batch tools do), that's a job for a different node or a basic_path like run_00 with the range starting where the padding still holds.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/abyz22/image_control
    

    or ComfyUI Manager → "image_control", restart. The pack's requirements add openpyxl, pytorch-lightning, kornia - you're installing all of that for this string concat, which tells you something about how this pack is bundled.

    When it's worth it

    Honestly, only if you're already in this pack and building a batch pipeline: generate a path per item, feed it to a save node, and let start_num step through the batch. If you're not already here, ComfyUI's built-in string math or a PrimitiveNode does the same concatenation without the pack's heavy install. The one thing it has over the alternatives is being a dead-simple single-purpose node that's hard to break - there's no way to misuse it beyond expecting padding it doesn't provide.

    Categoryabyz22

    Inputs (2)

    NameTypeDefaultDescription
    basic_pathSTRING
    start_numINT11–3000

    Outputs (1)

    NameTypeDescription
    TextSTRING