Nodes/ComfyUI-TinyBee/Process Path Name
ComfyUI Node

Process Path Name

Tear a filename into its useful parts

By TinyBeeman·Created about a year ago·Updated about a month ago· 1
Process Path Name
    • full_path
    • path_only
    • file_name_base
    • file_name_ext
    • tag_name
    path./

    Every automation workflow eventually hits the moment where you have a file path and you need a piece of it - the folder, the name without the extension, the extension itself - and ComfyUI gives you no built-in way to split it. Process Path Name is that splitter. One path in, five useful strings out.

    The killer use case is deriving related filenames. You load photo_portrait_v3.png, and with this node you can construct photo_portrait_v3.txt for a caption, or photo_portrait_v3_upscaled.png for an output, all without typing anything by hand. It's the glue for batch pipelines that process files and need to name their results after the source.

    The five outputs

    • full_path - the absolute path, resolved and normalized (relative inputs are made absolute against ComfyUI's working directory).
    • path_only - just the directory portion, no filename.
    • file_name_base - the filename without its extension: photo_portrait_v3.
    • file_name_ext - the extension including the dot: .png.
    • tag_name - the pack's opinionated extra: the filename base cut off at the first -, _, or digit. So photo_portrait_v3 tags to photo, and flower-01 tags to flower. It's a heuristic for "the actual subject of this file," and it's the output you'll either love or ignore - there's no middle ground.

    The single input is path (STRING, default ./).

    Installing it

    Process Path Name is part of ComfyUI-TinyBee, the small MIT-licensed utility pack from TinyBeeman. No models, no heavy install. Via Manager:

    1. ComfyUI Manager → Custom Nodes Manager.
    2. Search "ComfyUI-TinyBee" and install.
    3. Restart ComfyUI.

    Or clone:

    cd ComfyUI/custom_nodes
    git clone https://github.com/TinyBeeman/ComfyUI-TinyBee
    

    Restart and it's under 🐝TinyBee/Util. Standard library only for this node - the pack's jsonata dependency is just for its JSON Parser.

    Gotchas

    Two things. First, ./ and relative paths resolve against wherever ComfyUI was launched, not the workflow's folder - use absolute paths unless you're sure. Second, tag_name is a heuristic, not a parser: it stops at the first separator or digit, so final_v2_final.png tags to final, which is probably not what you were after. If your filenames are messy, build names from file_name_base and file_name_ext instead and treat tag_name as a bonus.

    Category🐝TinyBee/Util

    Inputs (1)

    NameTypeDefaultDescription
    pathSTRING./

    Outputs (5)

    NameTypeDescription
    full_pathSTRING
    path_onlySTRING
    file_name_baseSTRING
    file_name_extSTRING
    tag_nameSTRING