DIGIT Prompt Combine
Glue prompts together without a dozen text-node hacks
- prompt
Any real workflow ends up assembling a prompt from pieces: a subject line, a style tag, a trigger word from a LoRA, maybe a quality suffix. The stock way to do that is a pile of primitive string nodes and manual wiring that breaks the moment an input is empty. This node does the assembly properly: it joins whatever text is connected, skips empty inputs so you don't get double commas, and lets you pin a prefix and suffix that stay put. It's the "why doesn't ComfyUI ship this" node.
It's clearly designed as the plumbing behind the pack's prompt tooling - it has a dedicated trigger input for a LoRA Loader's trigger word, and it pairs naturally with the DIGIT Random Prompt node. But it's perfectly general: three connectable prompt inputs, a separator, prefix/suffix, one clean prompt string out.
How it works
The mechanism is exactly as simple as it looks. Each connected input is checked for emptiness; non-empty ones get joined with the separator (default ", "). Empty inputs vanish - that's the killer feature, because it means you can leave prompt_2 and prompt_3 unwired and the output is still a clean prompt, no trailing commas. The prefix and suffix are typed directly on the node (not connected), which is how you pin "best quality" on the end of every prompt without re-typing it.
The inputs:
- separator - the joiner,
", "by default. Change it to", "for booru-style tag lists or". "for sentence-style prompts. - trigger - connect the
trigger_wordsoutput from a DIGIT LoRA Loader (or any trigger string). - prompt_1, prompt_2, prompt_3 - the connectable text inputs.
prompt_1is the primary slot (Random Prompt's output goes here). - prefix, suffix - typed constants prepended/appended to the result.
The one output is prompt - the assembled string, also shown in the node UI so you can eyeball it before it goes anywhere.
A typical chain: Random Prompt → prompt_1; LoRA Loader's trigger_words → trigger; a quality suffix typed in; output → a CLIP Text Encode (the pack's own DigitTextEncode has a connectable text input so you don't have to convert the widget).
Install
cd ComfyUI/custom_nodes
git clone https://github.com/thedepartmentofexternalservices/comfyui-digit.git
cd comfyui-digit
pip install -r requirements.txt
(Or ComfyUI Manager → search comfyui-digit → install.) Restart ComfyUI, look under DIGIT.
Common issues
The empty-input skipping is the feature but it's also the surprise: if you expected a literal empty string to show up as a comma, it won't. That's correct behavior for prompt assembly - empty inputs disappearing is what prevents "subject, , style". The other habit to form: prefix and suffix are typed on the node, not connected, so if a prompt mysteriously loses its fixed part, check whether someone converted those widgets to inputs. It's a tiny node with no API, no auth, and essentially no failure modes - the only real problem is remembering it exists instead of stacking three string primitives.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| separator | STRING | , | Separator between non-empty inputs. |
| triggeropt | STRING | Trigger word from LoRA Loader. | |
| prompt_1opt | STRING | Primary prompt (e.g. from Random Prompt or LLM). | |
| prompt_2opt | STRING | Additional prompt text. | |
| prompt_3opt | STRING | Additional prompt text. | |
| prefixopt | STRING | Text prepended to the combined prompt (typed directly on node). | |
| suffixopt | STRING | Text appended to the combined prompt (typed directly on node). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |