WebuiMonacoPromptMultiText
A whole folder of prompt parts, living inside one ComfyUI node
- contents
- json
ComfyUI's stock prompt box is a single line, and it has been the sore spot for as long as the graph has existed. WebuiMonacoPromptMultiText is the front door of the WebUI Monaco Prompt pack (Taremin's extension, which also runs as an AUTOMATIC1111 plugin): a node that embeds the actual Monaco editor - the same one VSCode is built on - and lets you keep an entire virtual file tree of prompt parts inside it. Folders for characters, backgrounds, quality tags, camera shots. Each file is a prompt fragment you can edit in a real text editor with syntax highlighting, Vim keybindings if you want them, and autocomplete backed by the bundled danbooru.csv and extra-quality-tags.csv tag lists.
Why bother? Because ComfyUI workflows get unruly the moment you want variations. You end up with prompt fragments scattered across a dozen text widgets, or you go hunting for a wildcards setup. This node gives you a per-workflow library instead: everything lives in one node, in a tree you can see, and it feeds the two sibling nodes in this pack (JsonFilter and Template) to build final prompts.
How it works. The node's one input, text, holds a JSON document describing a tree of folders and files - but you almost never touch it as JSON. The editor shows a file explorer; you create folders and files in the UI, open a tab, and type. On every run the node walks that tree, and every file with content becomes an entry in two parallel lists:
contents- the file bodies, as aSTRINGlist. This is the raw material: wire it into the pack's Template node (assource_templates) or a text-concat node.json- one JSON metadata string per file, carryingname,path, andcontent. This is what you feed into WebuiMonacoPromptJsonFilter'sjson_listto slice the tree down to a chosen subset.
There's a selection mode: flip on checkboxes and only the files you tick get emitted. That alone turns the node into a low-rent but very effective A/B switcher for prompt sections.
Installing it. Same story for every node in this pack - it's one extension, so installing it once gets you all three. Clone into custom_nodes, or use ComfyUI Manager's "Install via Git URL":
cd ComfyUI/custom_nodes
git clone https://github.com/Taremin/webui-monaco-prompt
then restart ComfyUI. There is no requirements.txt and no model download - the ComfyUI side is a front-end web extension with prebuilt JS, so install is clone-and-go. One honest caveat from the README: the ComfyUI support is labelled experimental, and because this is an editor that swaps ComfyUI's own text widgets, you need a full page reload after install - a graph refresh won't pick it up. Old tutorials telling you to download a zip into web/extensions are dead since v0.1.2; ignore them.
The gotcha worth knowing. This node is the authoring half of the pipeline - it stores text, it doesn't assemble prompts. If you plug contents straight into CLIPTextEncode you'll get every file jammed in order, which is rarely what you want. The intended flow is MultiText → JsonFilter → Template → CLIPTextEncode. Reach for JsonFilter next when you want to pick files by name or path, and Template when you want <include:...> tags to assemble them. The pack ships a working demo workflow in examples/workflows/multitext_filter_demo.json that shows exactly that chain - drag it onto the canvas and watch the tree become a finished prompt.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | {} | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| contents | STRING | — |
| json | STRING | — |