Nodes/MD Nodes/MD: Smart Filename Builder
ComfyUI Node

MD: Smart Filename Builder

A ComfyUI node in MD_Nodes/Utility with 20 inputs and 2 outputs.

By MDMAchine·Created about a year ago·Updated 2 months ago· 14
MD: Smart Filename Builder
    • full_path_prefix
    • filename_preview
    presetCustom
    base_templateMD_Nodes_Workflow %Y-%m-%d
    project_pathAce-Step/313/
    mode_tag(Custom Mode)
    steps0
    schedule_info
    seed0
    genre
    custom_tag_1
    custom_tag_2
    counter_start0
    include_stepstrue
    include_scheduletrue
    include_seedfalse
    include_genrefalse
    include_countertrue
    separator -
    genre_max_length40
    debug_mode0 - Silent
    enable_profilingfalse
    CategoryMD_Nodes/Utility

    Inputs (20)

    NameTypeDefaultDescription
    presetCOMBOCustomFILENAME PRESET • Purpose: Automatically configure toggles and tags for standard MD workflows. • Options: Custom, Instrumental, Vocal, Master, etc. • Trade-offs: Presets override manual boolean toggles. ⭐ Recommended: 'Custom' for full manual control.
    base_templateSTRINGMD_Nodes_Workflow %Y-%m-%dBASE TEMPLATE • Purpose: The primary starting text of the filename. • Format: Supports Python strftime codes (%Y=Year, %m=Month, %d=Day). ⭐ Recommended: Keep date at start for easy OS sorting.
    project_pathSTRINGAce-Step/313/PROJECT SUBDIRECTORY • Purpose: Defines nested subfolders within the ComfyUI output directory. • Format: 'Folder/Subfolder/' (Auto-sanitized). ⭐ Recommended: Organize by Project/BPM/Version.
    mode_tagoptSTRING(Custom Mode)MODE TAG (CUSTOM) • Purpose: A text tag identifying the workflow mode. • Requirement: Only active when Preset is set to 'Custom'. • Note: Parentheses are preserved during sanitization.
    stepsoptINT0SAMPLING STEPS • Purpose: Appends step count (e.g., '20S').
    schedule_infooptSTRINGSCHEDULER INFO • Purpose: Appends scheduler name/sigma info.
    seedoptINT00–9007199254740991SEED VALUE • Purpose: Appends JS-safe seed (e.g., 'Seed_12345').
    genreoptSTRINGGENRE TAGS • Purpose: Appends sanitized genre string.
    custom_tag_1optSTRINGCUSTOM TAG 1 • Purpose: Extra user-defined tag (auto-sanitized).
    custom_tag_2optSTRINGCUSTOM TAG 2 • Purpose: Extra user-defined tag (auto-sanitized).
    counter_startoptINT00–99999COUNTER VALUE • Purpose: Current index for numbering (e.g. #0001). • Usage: Connect FilenameCounterNode here.
    include_stepsoptBOOLEANtrueINCLUDE STEPS • Toggle appending step count.
    include_scheduleoptBOOLEANtrueINCLUDE SCHEDULE • Toggle appending scheduler info.
    include_seedoptBOOLEANfalseINCLUDE SEED • Toggle appending seed value.
    include_genreoptBOOLEANfalseINCLUDE GENRE • Toggle appending genre tags.
    include_counteroptBOOLEANtrueINCLUDE COUNTER • Toggle appending numbered index.
    separatoroptSTRING - SEPARATOR • Purpose: String used to join filename parts. • Options: ' - ', '_', ' ', etc. ⭐ Recommended: ' - ' is most readable.
    genre_max_lengthoptINT4010–100GENRE MAX LENGTH • Purpose: Truncate long genre strings to keep filenames manageable.
    debug_modeoptCOMBO0 - SilentLOGGING VERBOSITY • Controls console output and string parse profiling.
    enable_profilingoptBOOLEANfalseENABLE PROFILING • Auto-on if debug >= 1.

    Outputs (2)

    NameTypeDescription
    full_path_prefixSTRING
    filename_previewSTRING