Prompt Companion: Strings to Subprompt
The adapter that turns plain text into a subprompt
- subprompt
Strings to Subprompt is the pack's "in" converter: you hand it a positive and a negative string, it hands back a subprompt object. That's the entire job, and it does it without drama.
You'd reach for it when you already have prompt text - from an old workflow, from a Text Encode node you're refactoring, or from somewhere that just produces strings - and you want that text to play inside the Prompt Companion world. The subprompt object is opaque to plain ComfyUI, so the only way to mix your existing prompt with the pack's saved subprompts is to wrap it up here first, then feed the result into Add Subprompt alongside a subprompt from the dropdown or from the checkpoint loader. It's also handy for taking one "base" prompt you keep in a file and turning it into a reusable building block without retyping it.
How it works
Mechanically it's a leaf node: it builds a subprompt named from_strings with your positive and negative text, no trigger words, and no nesting. There's nothing to resolve downstream of it - this is as simple as subprompts get, which is exactly the point.
Inputs and outputs
Both inputs are multiline strings:
positive- your prompt text.negative- your negative prompt text.
One output: subprompt, typed *. Because the type is generic, ComfyUI won't complain if you wire it into the subprompt input of Add Subprompt - that's the normal destination. From there the whole merge machinery (order control, nested resolution, deduplication) takes over.
Installing it
Part of the ComfyUI Prompt Companion pack. Via ComfyUI Manager, search "ComfyUI Prompt Companion", or:
cd ComfyUI/custom_nodes
git clone https://github.com/jfcantu/ComfyUI-Prompt-Companion.git
Restart ComfyUI; the node lives under prompt-companion. Only dependency is aiohttp, no model downloads.
Gotchas
- The subprompt output isn't previewable as text on its own. If you want to see what you just made, run it through Subprompt to Strings or Add Subprompt, which both surface the resolved text.
- There's no trigger word or folder metadata on the object it creates, so don't expect the checkpoint loader to pick it up automatically - this node is for immediate merging, not for building the saved library. Save things you want to reuse from the Edit Subprompts dialog instead.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| positive | STRING | Positive prompt text to convert to subprompt | |
| negative | STRING | Negative prompt text to convert to subprompt |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| subprompt | * | — |