Nodes/DIGIT Nodes/DIGIT Naming Preset
ComfyUI Node

DIGIT Naming Preset

Stop renaming your LoRA runs by hand

By thedepartmentofexternalservices·Created 6 months ago·Updated 26 days ago· 0
DIGIT Naming Preset
    • result
    • output_dir_template
    • lora_name_template
    actionpreview
    preset_name
    description
    output_dir_template{name}_{model}_r{rank}_{date}
    lora_name_template{name}_{model}_r{rank}_s{steps}
    checkpoint_templatestep_{step:06d}
    sample_templatesample_{prompt_index:02d}_{step:06d}
    preview_namemy_lora
    preview_modelflux1-dev
    preview_triggerohwx
    preview_rank16
    preview_steps1000
    preview_resolution1024

    If you train LoRAs more than once, you've hit the naming problem: my_lora_final_v3_actual folders, checkpoints named step_12345, sample images dumped with unreadable filenames. This node is the pack's answer - a template system for the whole naming mess that surrounds a training run. It defines the output directory name, the LoRA folder name, the checkpoint names, and the sample names as templates, saves them as named presets, and previews what a given run's names will look like before you commit.

    It's a small node and it knows it's a small node. It's aimed at people who run the DIGIT training pipeline regularly and want deterministic, greppable output names instead of whatever accumulated. For a one-off training session you can skip it; for a workflow you'll run fifty times, it's the difference between "where is that checkpoint" and knowing the exact path pattern.

    How it works

    You define four templates, each a format string with {variables}:

    • output_dir_template - {name}_{model}_r{rank}_{date} by default. The run's output directory.
    • lora_name_template - {name}_{model}_r{rank}_s{steps} by default. The LoRA weight folder name.
    • checkpoint_template - step_{step:06d} by default. Checkpoint filenames get the step number zero-padded.
    • sample_template - sample_{prompt_index:02d}_{step:06d} by default. Preview images get both prompt index and step.

    The action dropdown does the work: preview (default), save, load, list, delete. Save a template set under a preset_name and it becomes reusable across the trainer - the LoRA Trainer has a naming_preset input precisely to pull one of these in.

    To preview, you fill in the preview_* variables (preview_name, preview_model, preview_trigger, preview_rank, preview_steps, preview_resolution) and the node renders the actual filenames/directories those values would produce. description is just a note on the preset.

    Outputs: result (the rendered preview or save/load report), plus output_dir_template and lora_name_template passed through as strings - handy if you want the template itself wired downstream.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/thedepartmentofexternalservices/comfyui-digit.git
    cd comfyui-digit
    pip install -r requirements.txt
    

    (Or ComfyUI Manager → search comfyui-digit → install.) Restart ComfyUI, look under DIGIT.

    Common issues

    There isn't much to break - it's template rendering with no network and no GPU. The realistic gotcha is template syntax: the templates use Python str.format syntax, so {step:06d} zero-pads and {step} doesn't. If a preview comes out looking wrong, it's a formatting directive issue, not a node bug. Also remember the trainer only picks up a naming preset if you actually select it in its naming_preset input - saving a preset here doesn't make it the trainer's default. If your run names aren't matching what you previewed, that's the connection to check.

    CategoryDIGIT

    Inputs (13)

    NameTypeDefaultDescription
    actionCOMBOpreview5 options: save, load, list, delete, preview
    preset_nameoptSTRING
    descriptionoptSTRING
    output_dir_templateoptSTRING{name}_{model}_r{rank}_{date}
    lora_name_templateoptSTRING{name}_{model}_r{rank}_s{steps}
    checkpoint_templateoptSTRINGstep_{step:06d}
    sample_templateoptSTRINGsample_{prompt_index:02d}_{step:06d}
    preview_nameoptSTRINGmy_lora
    preview_modeloptSTRINGflux1-dev
    preview_triggeroptSTRINGohwx
    preview_rankoptINT161–256
    preview_stepsoptINT100010–100000
    preview_resolutionoptINT1024256–2048

    Outputs (3)

    NameTypeDescription
    resultSTRING
    output_dir_templateSTRING
    lora_name_templateSTRING