Nodes/MD Nodes/MD: Filename Counter
ComfyUI Node

MD: Filename Counter

A ComfyUI node in MD_Nodes/Utility with 8 inputs and 3 outputs.

By MDMAchine·Created about a year ago·Updated 2 months ago· 14
MD: Filename Counter
    • formatted_counter
    • current_value
    • info
    context_keydefault_counter
    start_value1
    increment1
    padding4
    reset_counterfalse
    prefix#
    suffix
    triggertrue
    CategoryMD_Nodes/Utility

    Inputs (8)

    NameTypeDefaultDescription
    context_keySTRINGdefault_counterCONTEXT KEY • Purpose: Unique name to identify this counter in the JSON save file. • Usage: Use different keys for different projects to keep counts separate. ⭐ e.g., 'Project_Alpha', 'Daily_Renders'
    start_valueINT10–999999START VALUE • Purpose: Initial value if key doesn't exist or is reset.
    incrementINT11–100INCREMENT • Purpose: Amount to increase counter by on each run.
    paddingINT40–8ZERO PADDING • Purpose: Number of digits to pad (e.g. 4 padding -> 0001).
    reset_counteroptBOOLEANfalseRESET COUNTER • Purpose: If True, forces counter back to 'start_value'.
    prefixoptSTRING#PREFIX • Purpose: String added before the number (e.g., '#0001').
    suffixoptSTRINGSUFFIX • Purpose: String added after the number.
    triggeroptBOOLEANtrueTRIGGER • Purpose: Controls if the counter saves and advances. • ON (Increment): Updates value and saves to disk. • OFF (Read Only): Returns current value without changing it.

    Outputs (3)

    NameTypeDescription
    formatted_counterSTRING
    current_valueINT
    infoSTRING