2026-05-30 11:45:35 +02:00
2026-05-30 11:38:41 +02:00
2026-05-30 11:45:35 +02:00

ComfyUI Combine string template

A ComfyUI custom node that performs positional placeholder substitution on a template string.

Author a template with $0, $1, $2, … placeholders and the node replaces each with the matching connected string input.

Install

Clone into your ComfyUI custom_nodes directory:

cd ComfyUI/custom_nodes
git clone https://github.com/SergeBekenkamp/ComfyUI-Combine-Strings-Template.git comfyui_replace_string_literals

Restart ComfyUI. No extra dependencies.

Node: Combine string template

  • Category: utils/string
  • Search aliases: template, format, interpolate, substitute, placeholder, string format, $0

Inputs

Input Type Notes
template string (multiline) The template text. Default $0.
strings autogrow string sockets

Output

Output Type
(string) The template with placeholders substituted.

Placeholder syntax

Reference connected string inputs by index:

  • $N — bare form, e.g. $0, $1, $10
  • ${N} — braced form, e.g. ${0}, ${1} (use when a digit follows, e.g. ${1}000)

Index N maps to socket stringN. Indices are greedy: $10 means index 10, not $1 followed by 0.

Example

image
S
Description
No description provided
Readme
32 KiB
Languages
Python 100%