Nodes/ComfyUI-Path-Helper/Create Project Root
ComfyUI Node

Create Project Root

The node every ComfyUI-Path-Helper chain starts from

By Billius-AI·Created 2 years ago·Updated 2 years ago· 21
Create Project Root
    • PATH
    project_root_name
    output_path_generation

    If you've ever built a SaveImage filename prefix by hand-typing something like outputs/project1/renders/img into a text box, you already know the problem this pack solves: that string breaks the second someone opens your workflow on Windows, because Windows wants backslashes and everyone else wants forward slashes. Create Project Root is where you stop doing that. It's the first node in every ComfyUI-Path-Helper chain - the thing that plants a flag and says "everything downstream builds from here."

    What it actually does

    Under the hood the whole pack is a thin, sensible wrapper around Python's os module - paths get joined with os.path.join (or the equivalent), which picks the right separator for whatever machine is running the workflow. Create Project Root just gives that mechanism a starting point. You name your project, the node hands back a PATH value, and every AddFolder or AddFileNamePrefix node downstream appends onto it correctly, no matter the OS.

    The inputs and outputs that matter

    There are only two inputs, and they're both worth understanding:

    • project_root_name - a plain string, whatever you want to call this project. "MyClient_Shoot1", "batch_2026_08", whatever keeps your output folder legible six months from now.
    • output_path_generation - an enum: relative or absolute. This is the one decision that actually matters here. relative builds the path underneath ComfyUI's own output directory, which is what you want almost always - it's portable, it works the same on your machine and a friend's, and it's what SaveImage expects by default. absolute gives you a full filesystem path from root, which you'd reach for if you're deliberately routing output somewhere outside ComfyUI's output folder - a shared network drive, an external SSD, a synced folder. Get this one wrong and your renders either land somewhere you didn't expect or the path resolution fails outright, so if you're not sure, start with relative.

    The single output is a PATH - a custom type this pack introduces. It's not a string yet, and that's deliberate: it's a builder object you keep handing to more Add Folder nodes before you ever convert it to text.

    How it fits the rest of the workflow

    This node alone does nothing you'd notice. The value is in the chain: Create Project Root → one or more Add Folder / Add Folder Advanced nodes to build out subfolders → Add File Name Prefix (or the Advanced version) to turn the whole thing into the STRING that plugs into SaveImage's filename_prefix input. That last conversion step matters - SaveImage doesn't understand PATH, only strings, so somewhere in your graph a PATH-to-STRING node has to run.

    How to install it

    Search ComfyUI-Path-Helper in ComfyUI Manager and install - the standard way most people will find this. Manually, it's the usual custom-nodes drop:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Billius-AI/ComfyUI-Path-Helper
    

    Restart ComfyUI after either method. There's nothing else to it - no requirements.txt, no models to fetch, no API keys. It's pure Python standard library (os, datetime) doing path math, so it starts up instantly and there's nothing to go wrong on install.

    Common issues & troubleshooting

    Nothing happens when I connect it to SaveImage. You can't - SaveImage's filename_prefix wants a string, and this node outputs PATH. Route through an Add File Name Prefix node first to get the STRING you actually need.

    My absolute path doesn't resolve. Double-check the string you typed is a real, valid path for the OS the workflow is actually running on. If you're sharing this workflow with someone on a different machine, an absolute path is the one part of this pack that isn't portable by design - that's exactly the tradeoff you're making by picking absolute over relative.

    I only see this pack mentioned as a dependency in someone else's workflow, I didn't choose to install it. That's common - it's a small utility pack, and it shows up as a required custom node in shared community workflows that build organized output folders. If ComfyUI Manager flagged it as missing, installing it via the steps above is all you need; you don't have to understand the whole pack to satisfy one workflow's dependency.

    Categorypath_helper

    Inputs (2)

    NameTypeDefaultDescription
    project_root_nameSTRING
    output_path_generationCOMBO2 options: relative, absolute

    Outputs (1)

    NameTypeDescription
    PATHPATH