Nodes/ComfyUI-BrainDead/BD Filename Template
ComfyUI Node

BD Filename Template

Resolve a filename template with %variable% placeholders into one STRING. Replaces ad-hoc string-concat chains. Wire the output into any save node's filename input. Built-in vars: %character%, %name%, %version%, %project%, %tag%, %suffix%. Add more via custom_vars (key=value per line).

By BizaNator·Created 7 months ago·Updated 16 days ago· 14
BD Filename Template
    • filename
    • status
    templatecharacters/%character%/%name%_v%version%%suffix%
    character
    name
    version01
    project
    tag
    suffix
    custom_vars
    strictfalse
    Category🧠BrainDead/Prompt

    Inputs (9)

    NameTypeDefaultDescription
    templateSTRINGcharacters/%character%/%name%_v%version%%suffix%Template with %varname% placeholders. Forward slashes create subdirectories. Undefined variables stay as %name% in output unless strict=True.
    characteroptSTRING
    nameoptSTRING
    versionoptSTRING01Version string. Just the number/code, no 'v' prefix (template adds it).
    projectoptSTRING
    tagoptSTRINGGeneric tag — typical use: part name like 'face', 'topwear', 'arm-l'.
    suffixoptSTRINGTrailing suffix — typical use: '_albedo', '_normal', '_v2'.
    custom_varsoptSTRINGAdditional variables, one per line as key=value. Examples: layer=topwear pass=normal resolution=4096 These become %layer%, %pass%, %resolution% in the template.
    strictoptBOOLEANfalseIf True, raise an error when the template contains undefined %variables%. If False, leave them in the output as %varname% literals.

    Outputs (2)

    NameTypeDescription
    filenameSTRING
    statusSTRING