Nodes/AUN ComfyUI Nodes/Path Filename Resolved (Video)
ComfyUI Node

Path Filename Resolved (Video)

A video filename with the real values burned in, not tokens

By loz2754·Created 8 months ago·Updated a day ago· 5
Path Filename Resolved (Video)
    • path_filename
    • sidecar_text
    MainFolderVideos
    Date_Subfoldertrue
    SubfolderAWan22
    SubfolderB
    manual_nameName
    name_modefalse
    NameCroptrue
    NameCropWords1
    prefix_1
    prefix_2
    Modeltrue
    Samplertrue
    Schedulertrue
    Stepstrue
    Cfgtrue
    suffix_1
    suffix_2
    Seedtrue
    delimiter
    auto_nameName
    model_short%model%
    model_name
    sampler_name%sampler%
    scheduler_name%scheduler%
    steps_value20
    cfg_value7.50
    seed_value123456
    sidecar_formatOutput only (text)

    Most filename builders hand you a template and let the saver resolve the tokens. Path Filename Resolved (Video) does the opposite: it resolves them, right in the node, using actual values you feed in. The output filename already says seed-1234, steps-30, cfg-7, and the real model name before it ever reaches a saver. That makes it the right choice when you're saving through a saver that doesn't know AUN's token syntax - like VHS Video Combine - or when you want to see the final name without running anything.

    How it works

    Structure is the usual: MainFolder (+ optional YYYY-MM-DD subfolder) + SubfolderA/SubfolderB, filename assembled from manual_name/auto_name (with the NameCrop/NameCropWords controls), prefixes, and suffixes, joined by delimiter. The difference is the optional inputs for actual values:

    • model_short / model_name - the model name (short goes in the filename, full goes in the sidecar's model field).
    • sampler_name, scheduler_name - sampler and scheduler strings.
    • steps_value (INT), cfg_value (FLOAT), seed_value (INT) - the numbers, formatted as steps-<v>, cfg-<v>, seed-<v> (steps/cfg only when > 0, seed at 0 allowed).

    The Model, Sampler, Scheduler, Steps, Cfg, Seed toggles decide which of those get included, and there's no way to include a token you haven't supplied a value for - it just skips it. You can wire these from an AUN Inputs node or an Extract Widget Value node to keep everything automatic.

    The sidecar, which is the sleeper feature

    There's an optional sidecar_format enum: choose Save to file and the node writes a .txt (or .json) next to the output in ComfyUI's output folder, documenting the main parameters. Either way the node always returns the sidecar text as its sidecar_text output. That's your poor-man's metadata - a text record of what made this video, without depending on video container metadata.

    Outputs

    • path_filename (STRING) - the fully resolved final path+name. Wire into VHS Video Combine or any saver that takes a path string.
    • sidecar_text (STRING) - the sidecar content, usable or just displayable.

    When to reach for it

    If you save video via VHS (Video Helper Suite - the pack even acknowledges it as an inspiration) or any standard saver that can't parse %token% placeholders, this is the node that bridges your nice filename logic to that saver. It's the video sibling of the image-side AUN Filename Resolver Preview V2.

    Install

    Part of AUN ComfyUI Nodes (loz2754):

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

    or via ComfyUI Manager, then restart. Deps (piexif, opencv-python-headless, imageio-ffmpeg, requests) install via Manager; ffmpeg (system or imageio-ffmpeg) is what actually encodes video. No model files.

    The one thing to keep straight: if you wire actual values and a saver that also resolves tokens, you'll get doubled names (seed-1234_seed-1234). Pick one resolution layer - this node is the "resolve here" option, so turn off token resolution in the saver.

    CategoryAUN Nodes/File Management

    Inputs (28)

    NameTypeDefaultDescription
    MainFolderSTRINGVideosTop-level folder under which the path will be created (e.g., Videos).
    Date_SubfolderBOOLEANtrueInsert a YYYY-MM-DD subfolder beneath MainFolder.
    SubfolderASTRINGWan22Optional subfolder A (e.g., project/model name).
    SubfolderBSTRINGOptional subfolder B (e.g., variant).
    manual_nameSTRINGNameManual name value used only when Name Mode is Manual.
    name_modeBOOLEANfalseManual: use 'manual_name'. Auto: use 'auto_name' input.
    NameCropBOOLEANtrueWhen Auto mode, keep only the first N words of 'auto_name'.
    NameCropWordsINT11–6Max words from 'auto_name' to keep when NameCrop is On.
    prefix_1STRINGOptional free-text prefix #1 to include before tokens.
    prefix_2STRINGOptional free-text prefix #2.
    ModelBOOLEANtrueInsert model name token replaced by actual model string here.
    SamplerBOOLEANtrueInsert sampler name.
    SchedulerBOOLEANtrueInsert scheduler name.
    StepsBOOLEANtrueInsert steps value formatted as 'steps-<v>' when > 0.
    CfgBOOLEANtrueInsert cfg value formatted as 'cfg-<v>' when > 0.
    suffix_1STRINGOptional free-text suffix #1 placed after tokens.
    suffix_2STRINGOptional free-text suffix #2.
    SeedBOOLEANtrueInsert seed value formatted as 'seed-<v>' (0 allowed).
    delimiterSTRING String used to join parts (prefixes/tokens/suffixes) into the filename.
    auto_nameoptSTRINGNameAuto mode name source. Cropped to the first N words when NameCrop is On.
    model_shortoptSTRING%model%Actual model short name to insert when Model is On.
    model_nameoptSTRINGFull model name (used in sidecar 'model' field).
    sampler_nameoptSTRING%sampler%Actual sampler name to insert when Sampler is On.
    scheduler_nameoptSTRING%scheduler%Actual scheduler name to insert when Scheduler is On.
    steps_valueoptINT20Actual steps value (integer).
    cfg_valueoptFLOAT7.50Actual cfg value (float).
    seed_valueoptINT123456Actual seed value (integer).
    sidecar_formatoptCOMBOOutput only (text)Choose sidecar output format. 'Save to file' writes the .txt/.json into ComfyUI's output folder next to the output; the node always returns the sidecar text as its fourth output.

    Outputs (2)

    NameTypeDescription
    path_filenameSTRING
    sidecar_textSTRING