Nodes/comfy-ovum/Folder Paths
ComfyUI Node

Folder Paths

Stop hard-coding ComfyUI's directories in your workflow

By sfinktah·Created about a year ago·Updated 10 months ago· 7
Folder Paths
    • path
    methodget_input_directory
    absolute_pathsfalse
    normalize_pathstrue
    forward_slashestrue

    The worst kind of path is the one you typed once on your machine and that breaks on everyone else's. Folder Paths is Ovum's answer to that: it asks ComfyUI's own folder_paths module for its well-known directories and hands you the result as a clean STRING, so your workflow stops assuming C:\ComfyUI\... or /home/you/... and starts asking the running install where things actually live.

    This is the same plumbing the core Save Image / Load Image nodes use under the hood, exposed as a node you can wire into anything that wants a path. That makes it genuinely useful for cross-machine workflows - the ones you share on comfy.icu or hand to a friend - where a hard-coded path is a guaranteed "missing nodes / can't find folder" moment.

    What it returns

    Pick a method from the dropdown:

    • get_input_directory - the input folder you load images from
    • get_input_subfolders - subfolders under input
    • get_output_directory - where saves land
    • get_temp_directory, get_user_directory, get_system_user_directory
    • base_path, models_dir - ComfyUI's root and models folders

    The options list is built dynamically from what the running ComfyUI exposes, so it tracks your install rather than a hard-coded list. The output is one path (STRING) socket.

    Three optional toggles shape the output:

    • absolute_paths - resolve to an absolute path (default off)
    • normalize_paths - normalize ./.. and duplicate separators (default on)
    • forward_slashes - convert Windows backslashes to forward slashes (default on)

    That last one is worth leaving on. Forward slashes travel between Windows and Linux without drama, and it's the classic "this worked locally but not in the cloud" failure you avoid by defaulting to it.

    What to wire it into

    • A saver or image loader that takes an explicit directory, so saves always go to the real output folder.
    • The pack's wildcard processor or file-path utilities - build a path in the graph instead of typing it.
    • Python String Format - compose a full path from Folder Paths plus a filename: {arg0}/{arg1}.

    Installing it

    It ships in sfinktah/comfy-ovum:

    cd ComfyUI/custom_nodes
    git clone https://github.com/sfinktah/comfy-ovum
    

    or search comfy-ovum in ComfyUI Manager, then restart. No models, no heavy deps.

    Gotchas

    The usual caveats are modest. If the resolved folder doesn't exist on disk, the node happily returns the path anyway - it doesn't create or validate anything, it just tells you where things are. And a method that returns a list (like get_input_subfolders) gets stringified, so if you need a genuine list of folders rather than one string, reach for the pack's Image List Loader and its folder utilities instead. For the common "give me the real output directory as a portable string" case, this is the node.

    Categoryovum/utils

    Inputs (4)

    NameTypeDefaultDescription
    methodCOMBOget_input_directory8 options: get_input_directory, get_input_subfolders, get_output_directory, get_system_user_directory, get_temp_directory, get_user_directory, +2
    absolute_pathsoptBOOLEANfalse
    normalize_pathsoptBOOLEANtrue
    forward_slashesoptBOOLEANtrue

    Outputs (1)

    NameTypeDescription
    pathSTRING