Nodes/AUN ComfyUI Nodes/Path Filename (Legacy)
ComfyUI Node

Path Filename (Legacy)

The legacy filename builder that still works (if you need it)

By loz2754·Created 8 months ago·Updated about 15 hours ago· 5
Path Filename (Legacy)
    • path
    • filename
    MainFolderMain
    Date_Subfoldertrue
    Subfolder_A
    Subfolder_B
    nameName
    Datetrue
    prefix_1
    prefix_2
    Modelfalse
    Samplertrue
    Schedulertrue
    Seedtrue
    Stepstrue
    CFGtrue
    Labels
    suffix_1
    suffix_2
    delimiter
    batch_size1

    Path Filename is the original image path/filename builder from the AUN pack, and the first thing you need to know about it is in its own name in the node search: Legacy. It still works, it's kept around so old workflows don't break, but the pack's own documentation tells you to use Path Filename V2 for anything new. If you're reading this because you downloaded a workflow and it's full of these, here's how it thinks.

    What it does

    It builds two strings - path and filename - from a pile of toggles and free-text fields. The path is MainFolder + optional dated subfolder + up to two levels of custom subfolders. The filename is an assembly of prefixes, a base name, and whatever parameter tokens you switch on: %model_short%, %sampler_name%, %scheduler%, seed_%seed%, steps_%steps%, CFG_%cfg%, and %date%. Each toggle (Model, Sampler, Scheduler, Seed, Steps, CFG, Date) decides whether that token is included, and delimiter controls the separator between parts. There are also Labels (free text to stuff in the filename) and two prefixes/suffixes each.

    The key design choice, and the reason it's legacy: it outputs path and filename as separate wires. The V2 family consolidated everything into one combined path_filename string because that turned out to be far less fiddly to route - one wire instead of two that have to stay in sync.

    The inputs that matter

    • MainFolder - root output folder. Keep it short; Windows path-length limits bite here.
    • Date_Subfolder - adds a YYYY-MM-DD subfolder under MainFolder. Great for daily archives.
    • Subfolder_A / Subfolder_B - your custom structure; add levels by putting / in the string.
    • name - the base filename. Everything else hangs off this.
    • The token toggles - this is where the "auto filename" magic lives. If you want my_photo_seed_1234_CFG_7_steps_30.png, switch on Seed, CFG, Steps.

    It also takes an optional batch_size (used by savers to number a batch) and outputs only path and filename.

    Legacy caveats

    The name is honest: V2 exists because the separate-output design and placeholder formatting are harder to maintain. If a saved file shows up with a raw %model_short% instead of a model name, the placeholder wasn't resolved - that usually means the string went somewhere that doesn't know the token syntax. For new work, reach for AUN Path Filename V2 and pair it with AUN Save Image V2; V2 also gives you the manual/auto naming modes this one lacks (it has a plain name field only).

    Install

    Still part of the AUN ComfyUI Nodes pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/loz2754/AUN-ComfyUI-Nodes
    

    or install "AUN ComfyUI Nodes" from ComfyUI Manager, then restart. Pack deps (piexif, opencv-python-headless, imageio-ffmpeg, requests) install via Manager or pip install -r custom_nodes/AUN-ComfyUI-Nodes/requirements.txt. No model downloads.

    Bottom line: if an existing workflow uses this, leave it alone - it still produces fine filenames. If you're starting fresh, skip straight to V2. The legacy label isn't a judgment on quality; it's AUN telling you where the ecosystem is going.

    CategoryAUN Nodes/File Management

    Inputs (19)

    NameTypeDefaultDescription
    MainFolderSTRINGMainThe root output folder.
    Date_SubfolderBOOLEANtrueIf on, creates a subfolder with the current date (YYYY-MM-DD).
    Subfolder_ASTRINGFirst level of custom subfolders. Add more levels by adding a / between them.
    Subfolder_BSTRINGSecond level of custom subfolders.
    nameSTRINGNameThe base name for the file.
    DateBOOLEANtrueInclude the date placeholder (%date%) in the filename.
    prefix_1STRINGFirst custom prefix for the filename.
    prefix_2STRINGSecond custom prefix for the filename.
    ModelBOOLEANfalseInclude model placeholder (%model_short%) in the filename.
    SamplerBOOLEANtrueInclude sampler placeholder (%sampler_name%) in the filename.
    SchedulerBOOLEANtrueInclude scheduler placeholder (%scheduler%) in the filename.
    SeedBOOLEANtrueInclude the seed placeholder as seed_%seed% in the filename.
    StepsBOOLEANtrueInclude the steps placeholder as steps_%steps% in the filename.
    CFGBOOLEANtrueInclude the CFG placeholder as CFG_%cfg% in the filename.
    LabelsSTRINGAdditional labels to include in the filename.
    suffix_1STRINGFirst custom suffix for the filename.
    suffix_2STRINGSecond custom suffix for the filename.
    delimiterSTRING The character used to separate parts of the filename.
    batch_sizeoptINT11–1000The batch size for the output.

    Outputs (2)

    NameTypeDescription
    pathSTRING
    filenameSTRING