ComfyUI Node

output dir

Where did your image actually go? Stop guessing the output folder

By StableLlama·Created about a year ago·Updated 4 days ago· 48
output dir
    • output_path

    The first time you lose a batch of images, you'll understand why this node exists. You hit Queue, the run finishes green, and your images aren't where you thought they were. ComfyUI's save nodes have a "filename prefix" that decides the name, but the folder comes from the application's output directory - and on a portable install, a Docker setup, or a machine where you redirected --output-directory, that folder is not necessarily the ComfyUI/output you were picturing. output dir (its code name is "Get ComfyUI Output Path") is a one-trick node that just tells you the truth: it returns ComfyUI's actual output path as a string.

    It's part of Basic data handling, the big zero-dependency utility pack from StableLlama - a few hundred plain-Python nodes that show up in workflow-share dependency lists way more often than in discussion threads. This is one of the quieter nodes in it, but it earns its place. The most common way people use it: wire output_path into a node that writes text or JSON to disk, so you can dump a manifest or caption file next to your renders without hardcoding a path that breaks on someone else's machine.

    How it works

    There's no input at all, which is the whole point. The node calls ComfyUI's get_output_directory() and hands you the result. That's one line of Python - no path juggling, no file watching, nothing to configure. Whatever ComfyUI considers its output folder at that moment is what you get, so if you change it later, every workflow using this node picks the change up automatically.

    The input and output that matter

    The only thing you'll ever see on it:

    • output_path (STRING) - the absolute path to ComfyUI's output directory. Wire it into any STRING input: a save-text node, a filename prefix builder, or a "show text" node just to display it and copy it from the UI.

    That's the entire surface area. If you were hoping for a node that also creates folders or lists files, that's the pack's other Path nodes (PathJoin, PathListDir, PathExists...) - this one is deliberately narrow.

    Installing it

    This is the easiest install in the ecosystem, which is worth saying plainly because most ComfyUI installs are not:

    1. Install ComfyUI-Manager if you don't have it.
    2. In Manager, search for "Basic data handling" and install it.
    3. Restart ComfyUI.

    Or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/StableLlama/ComfyUI-basic_data_handling
    

    Then restart ComfyUI. There are no Python dependencies (dependencies = [] in the project file, no requirements.txt) and no model files to download, so nothing about this pack can drag your environment into dependency hell.

    Troubleshooting

    • The path looks "wrong" to you. Double-check where ComfyUI actually writes: portable installs and --output-directory flags move it. The node is reporting reality, not the default. If you're running ComfyUI on a different machine or in a container, output_path is the path inside that environment - mapping it to your host often means adding a mount prefix.
    • Windows backslashes. On Windows you'll get paths like C:\Users\...\output. If you feed that into a node that chokes on backslashes (JSON escaping, regex, some string tools), run it through the pack's path normalizer or escape it.
    • It's the default output dir, not a per-node override. A save node can be told to write elsewhere; this node won't know about that. If your file is truly lost, check the save node's own path settings first.
    CategoryBasic/Path

    Inputs (0)

    No inputs

    Outputs (1)

    NameTypeDescription
    output_pathSTRING