Nodes/ComfyUI-GU_Nodepack/GU Project Path
ComfyUI Node

GU Project Path

The filename builder that turns 'test_00001_.png' into something you can actually find

By alexguryev·Created 4 months ago·Updated 23 days ago· 2
GU Project Path
    • path
    custom_nametest
    use_custom_nametrue
    change_from
    change_to
    name_suffix
    use_datefalse
    model_type
    proc_type
    is_upscalefalse
    stub
    up_factor
    filename
    tech_suffix
    project
    seed

    GU Project Path is the biggest node in this pack and the one the whole file-organizing philosophy hangs off. It assembles a full output path inside ComfyUI's /output folder from a pile of optional components: project folder, upscale folder, date folder, filename, suffix, upscale factor, model type, process type, tech suffix, and seed. You wire in what you have, it builds the path, and everything you save lands somewhere you can actually find later.

    If you've ever faced an output/ folder full of 00001_.png files and tried to figure out which was the upscale, this node is the answer. It encodes the recipe into the directory structure and filename itself.

    The path shape

    The README gives the exact template:

    [(work)/project/][_UP/][date/]name[_namesuffix][_upNx][_modeltype][_proctype][_techsuffix][_seed]_#####_.ext
    

    Square brackets are optional - a component only appears when you supply its input. The _#####_ and extension are appended automatically by Comfy. So the same generation can be test_00001_.png (minimal) or (work)/TEST/_UP/2026_04_11/TEST_test_a_up3x_F1D_(used_loras_detdaemon)_00001_.png (maximal). Dates are written YYYY_MM_DD in reverse order so Explorer sorts them correctly - a small touch the author clearly cares about.

    The inputs that matter

    • custom_name / use_custom_name - the filename, typed or read from an upstream filename input (the README suggests feeding it from GU Get Media Input Name). Flip the toggle to choose which source wins.
    • change_from / change_to - find-and-replace a substring in the name. Handy when an upstream filename has junk you want out.
    • name_suffix - appended after the name, e.g. test_a.
    • is_upscale + up_factor - on, adds a _UP/ folder; a factor above 1 adds _upNx to the name (rounded up, values under 2 ignored). For upscaling passes, the KB's upscaling essay is your friend on the practice; this node just keeps the two generations distinguishable.
    • model_type - a short label like F1D for Flux-Dev or SDXL. The codes are yours to edit in web/model_codes.txt.
    • proc_type - the process: t2i, i2i, i2v, inp (inpaint), otp (outpaint), v2v, and more. The README advises omitting it for upscales, since technically an upscale is also a distinct process but it affects the path differently.
    • tech_suffix - fed from GU Image Label's output, so your filename carries (used_lora_ctrlnet).
    • project - the codename, typically from GU Project Name. When set, the path starts under (work)/<project>/.
    • seed - adds _s### when connected.

    One output: path, a STRING, which you feed into Save Image / Save Video filename fields and GU Save Image Info.

    The security story (worth reading)

    Every path this builds is confined to ComfyUI's output directory. The README documents it in detail: a .. component, an absolute path, or a drive prefix is rejected outright with a console warning - never silently rewritten. Remaining components are sanitized (illegal characters, trailing dots/spaces, reserved Windows names), and the resolved path is verified with os.path.realpath + os.path.commonpath against the output root, re-verified after directory creation so a symlink swap can't slip through. Subfolders inside output are fully supported. This is genuinely good hygiene for a node whose inputs come from the graph.

    Install

    ComfyUI Manager → search "GU Nodepack" → install → restart, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/alexguryev/ComfyUI-GU_Nodepack
    cd ComfyUI-GU_Nodepack
    pip install -r requirements.txt
    

    Deps: psutil, requests, gu-funclib>=1.9.0. No models. Windows-tested, single-user design.

    Where people get tangled

    The use_custom_name toggle is the classic gotcha - leave it on (its default) and your upstream filename input is ignored, and you'll swear the node is broken while it dutifully uses the hardcoded custom_name. And if you want a custom subfolder of your own, the README's rule is: leave project empty (so (work)/ is skipped) and express the folder via custom_name - project mode always blocks subfolder splitting by design.

    CategoryGU_Nodepack

    Inputs (15)

    NameTypeDefaultDescription
    custom_nameSTRINGtestmanual filename
    use_custom_nameBOOLEANtrue
    change_fromSTRINGsub-name to change
    change_toSTRINGreplacer for sub-name
    name_suffixSTRING
    use_dateBOOLEANfalse
    model_typeSTRINGgenerative model type
    proc_typeCOMBOprocess type
    is_upscaleBOOLEANfalseenable to add `_UP` sub-folder
    stubSTRING
    up_factoroptFLOATadds `_up#x` to output name
    filenameoptSTRINGfilename defined outside
    tech_suffixoptSTRINGtechnical suffix string
    projectoptSTRINGproject codename
    seedoptINTadds `_s###` seed number to output name

    Outputs (1)

    NameTypeDescription
    pathSTRING