Nodes/ComfyUI Smart Helper Nodes/Smart Format String (10 params)
ComfyUI Node

Smart Format String (10 params)

Smart Format String, but with ten slots for when five isn't enough

By slvslvslv·Created 2 years ago·Updated a day ago· 3
Smart Format String (10 params)
  • param_1
  • param_2
  • param_3
  • param_4
  • param_5
  • param_6
  • param_7
  • param_8
  • param_9
  • param_10
  • formatted_string
string_formatValue is: %1

Smart Format String (10 params) is exactly what the name says: the pack's format-string node with ten parameter slots instead of five. Everything else is shared - same %1%N parameter syntax, same %H/%M/%S/%y/%m/%d date-and-time placeholders, same behavior of re-running whenever a time placeholder is in the template so your timestamps stay live.

It's not a different node in any meaningful way - in the source it literally subclasses the five-param version and overrides the slot count. But if your string-building needs a lot of inputs - say you're composing a full settings line from a seed, width, height, CFG, steps, sampler, scheduler, model name, LoRA, and strength - ten slots means one node instead of two chained together.

How it works

Write a template in string_format, wire any-type values into param_1 through param_10, and the node replaces each %N with the corresponding parameter while handling the %H-style time tokens first. Parameters are substituted in reverse order so a %1 never clobbers the leading digits of a %10 - the reverse-substitution order is the correctness detail, and it matters here precisely because there are ten slots.

The time placeholders are the feature to remember: %H hours, %M minutes, %S seconds, %y year, %m month, %d day, all local machine time. Include one and the node re-evaluates every queue, so a timestamped filename genuinely refreshes rather than caching the first run.

Where you'd reach for it

Filename and logging lines are the sweet spot. A render-info dump like:

seed=%1 w=%2 h=%3 cfg=%4 steps=%5 sampler=%6 sched=%7 model=%8 lora=%9 strength=%10

fits perfectly, and feeding the result into the pack's SmartSaveText gives you a full settings ledger per run. If you never need more than a handful of inputs, save the vertical space and use the five-param version - this one is strictly for the times you're squeezing the whole workflow state into one string.

Installing it

Same pack, same install:

cd ComfyUI/custom_nodes
git clone https://github.com/slvslvslv/ComfyUI-SmartHelperNodes

Restart ComfyUI, or grab "SmartHelperNodes" from ComfyUI Manager. No pip dependencies, no downloads.

Common issues

Mostly the same list as its little sibling: time tokens use local time; an unwired %N renders as an empty string (silent, not an error); and the live-clock re-evaluation means any template containing a time placeholder keeps re-executing, which is what you want for timestamps. If you wire in a non-string value, it's stringified like the five-param version, so a float strength renders as 0.8 - matching what you'd expect from the pack's own lora_string formatting.

CategorySmartHelperNodes

Inputs (11)

NameTypeDefaultDescription
string_formatSTRINGValue is: %1Format string with: %1-%5 for parameters %H for hours (00-23) %M for minutes (00-59) %S for seconds (00-59) %y for year (00-99) %m for month (01-12) %d for day (01-31)
param_1opt*
param_2opt*
param_3opt*
param_4opt*
param_5opt*
param_6opt*
param_7opt*
param_8opt*
param_9opt*
param_10opt*

Outputs (1)

NameTypeDescription
formatted_stringSTRING