π Array To Text
Going back to one string, and picking the right glue
- Text
- Count
The return trip
Every node in the honda-nodes array group speaks one format: a string with newlines in it. That's fine while you're filtering, slicing, and counting. It stops being fine the moment the list has to become something a model or a filename can read - a comma-separated tag line, a ", "-joined cast of characters, a space-separated keyword blob. Array To Text is the exit door.
Concretely: you keep your prompt ingredients as a tidy one-per-line list, clean them with π Array Filter, maybe sample two with π Array Get Item, and then this node glues the survivors into masterpiece, best quality, film grain and hands that to a CLIP Text Encode. Lists are for editing; single strings are for prompting.
How it works
It splits the incoming string on newlines, optionally trims each line, optionally drops empties, then joins with your separator and reports how many items went in.
The separator defaults to , - comma plus space, which is the correct default for tag-style prompts and the thing you'd otherwise forget to type. It is used verbatim; there's no escaping and no special tokens. Set it to , for the space-free variant that some encoders prefer, (a single space) when you're building a keyword blob, \n when you want to pass a list through unchanged and stay in array format, or + if you're doing something regrettable with weights.
Nothing clever happens to your text. It does not lowercase, does not dedupe, does not wrap in parentheses. That's the split of responsibility in this pack: Filter does the cleaning, To Text does the joining, and if you want both you chain Filter into To Text and leave the second node's Trim/Remove Empty as belt-and-braces.
Inputs and outputs
Array is a socket-only input - you can't paste a list into it, you have to wire one in from Array From Text, Array Filter, Array Slice, π List Files or π Read File. This is a deliberate design choice by the author and the usual source of "why is this field not editable" confusion on first contact.
The two booleans - Trim Items (on) and Remove Empty (on) - are the ones that matter in practice, because they're what stop a trailing blank line from becoming a trailing , in your prompt. Keep them on unless the empty items are load-bearing, which they almost never are.
Outputs are Text and Count. Text goes wherever a string goes: CLIP Text Encode, a Text primitive, π οΈ Print to Console for a sanity check, or into π JSON Get Value/filename fields. Count is the number of items that actually got joined - handy when the prompt looks short and you want to know whether the filter overdid it.
Install
Extensions β Node Pack β search "Honda Nodes" β Install β restart in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone --depth 1 https://github.com/Avaray/honda-nodes.git
cd honda-nodes
python install.py # use ComfyUI's python; portable Windows: ..\..\..\python_embeded\python.exe install.py
That installer drops jq and ime into honda-nodes/bin for the JSON and metadata nodes. Array nodes don't call either binary, so a missing bin/ folder won't stop this one from working - but you'll want it the day you add π JSON Get Value to the same workflow.
The other install requirement worth knowing: honda-nodes is pure V3 schema (comfy_api.latest) and declares ComfyUI >= 0.38.0. On an older build the pack registers nothing at all and looks broken.
Common issues
Double separators. cat, , dog in the output means Remove Empty was off and there was a blank line in the source list. Turn it back on, or run π Array Filter upstream with Remove Empty enabled.
Count says 1 and the text looks right. Then your "array" was a single line. Newlines are the delimiter - a list separated by commas is one item here. Put π Array From Text in front and split it properly.
The node never executes. Non-output nodes only run when an output node needs their result. If you're watching the joined text in a preview, you're fine; if you wired it into a field that's cached upstream, ComfyUI may not bother re-running it. This is the general ComfyUI execution model - it works backwards from output nodes - not a quirk of this pack.
A note on where the joined string is going. If it's heading for a CivitAI upload or a filename, remember commas and spaces in filenames are a bad time on Windows; use _ as the separator and check the result before it hits disk.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| array | STRING | Newline-separated array string to join. | |
| separator | STRING | , | Separator placed between each item in the output text. |
| trim_items | BOOLEAN | true | Strip leading and trailing whitespace from each item before joining. |
| remove_empty | BOOLEAN | true | Drop empty lines before joining. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| Text | STRING | β |
| Count | INT | β |