Path Builder
Stop building filename prefixes with three text nodes
- path
Path Builder joins a handful of text fields into one /-separated string you can drop straight into a filename_prefix input - the thing on Save Image, Save Video, and the latent-save nodes that decides which subfolder and base name your files get. If you've ever wanted files under projects/sunset/run_3 instead of a flat wall of ComfyUI_00042_.png, this is the node that makes it manageable.
It's solving a genuinely boring problem that every ComfyUI user runs into eventually: filename_prefix is a small template language (subfolders via /, plus %year%, %width%-style tokens), and the usual way to feed it from multiple values is a chain of String primitives into a Concatenate Text node. Fine once. Annoying the fiftieth time, because every piece lives in its own node and editing any one of them means finding it. Path Builder keeps the pieces as separate fields on a single node and hands you one clean path output to wire. That's the whole value: fewer nodes, fewer links, each part still editable on its own.
The inputs and outputs that matter
segment_1…segment_16- up to sixteen optional text fields, joined in order. Blank fields are skipped, and each field is trimmed of surrounding slashes and spaces, sovideos/and/h3_clipbecomevideos/h3_clip. A leading/on the first field is dropped too - ComfyUI won't accept absolute prefixes anyway.path(output) - the joined string, ready for anyfilename_prefixsocket.
The node ships every one of those 16 fields, which would be ugly; the pack's frontend script is what saves it. You start with one field and a +/- button row. + reveals the next one (up to 16), - removes the last visible field - and removing a field takes its input socket and any link into it with it, so nothing invisible gets silently concatenated. The visible-field count saves with the workflow, and on load a field that holds text or a link is shown even if it sits past the saved count.
Wiring it
Path Builder ─▶ (filename_prefix) Save Image
└▶ (path) Preview & Save Image
The output is a plain STRING, so it also feeds the path input on this pack's Preview & Save Image nodes, or anything else that takes a string and wants a path.
Installing it
Path Builder is one node in ComfyUI-Arisu-Nodes (swqa7697, GPL-3.0, released September 2026 - new, so judge it by its docs rather than reputation). The pack declares zero runtime dependencies: it only uses APIs ComfyUI already ships, so there's no pip install step and nothing to download.
ComfyUI Manager: Manager → Install Custom Nodes → search "ComfyUI-Arisu-Nodes", install, restart. Or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/swqa7697/ComfyUI-Arisu-Nodes.git
Restart ComfyUI and it appears under Add Node → Arisu Nodes.
Gotchas
The separator is always /, which is correct on every platform - ComfyUI treats slashes in filename_prefix as subfolder separators regardless of OS. The one thing to remember is that the fields only do their trimming after you've typed them; a blank middle field is skipped rather than producing a double slash, so projects//test can't happen by accident. And since filename_prefix is read at save time, changing a segment and re-running is all it takes to land files in a new folder.
If you don't need subfolder math at all, don't bother - the default ComfyUI prefix is fine. Reach for this when your output starts looking like a junk drawer.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| segment_1opt | STRING | One path piece. Blank pieces are skipped; surrounding slashes and spaces are trimmed. | |
| segment_2opt | STRING | One path piece. Blank pieces are skipped; surrounding slashes and spaces are trimmed. | |
| segment_3opt | STRING | One path piece. Blank pieces are skipped; surrounding slashes and spaces are trimmed. | |
| segment_4opt | STRING | One path piece. Blank pieces are skipped; surrounding slashes and spaces are trimmed. | |
| segment_5opt | STRING | One path piece. Blank pieces are skipped; surrounding slashes and spaces are trimmed. | |
| segment_6opt | STRING | One path piece. Blank pieces are skipped; surrounding slashes and spaces are trimmed. | |
| segment_7opt | STRING | One path piece. Blank pieces are skipped; surrounding slashes and spaces are trimmed. | |
| segment_8opt | STRING | One path piece. Blank pieces are skipped; surrounding slashes and spaces are trimmed. | |
| segment_9opt | STRING | One path piece. Blank pieces are skipped; surrounding slashes and spaces are trimmed. | |
| segment_10opt | STRING | One path piece. Blank pieces are skipped; surrounding slashes and spaces are trimmed. | |
| segment_11opt | STRING | One path piece. Blank pieces are skipped; surrounding slashes and spaces are trimmed. | |
| segment_12opt | STRING | One path piece. Blank pieces are skipped; surrounding slashes and spaces are trimmed. | |
| segment_13opt | STRING | One path piece. Blank pieces are skipped; surrounding slashes and spaces are trimmed. | |
| segment_14opt | STRING | One path piece. Blank pieces are skipped; surrounding slashes and spaces are trimmed. | |
| segment_15opt | STRING | One path piece. Blank pieces are skipped; surrounding slashes and spaces are trimmed. | |
| segment_16opt | STRING | One path piece. Blank pieces are skipped; surrounding slashes and spaces are trimmed. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| path | STRING | The fields joined with '/', blanks skipped. |