Create Folder JNK
Make sure the output directory exists before something tries to write
Create Folder is the most mundane node in the JNK pack and one of the more useful ones once you automate anything. It makes a directory. That's it. But it exists because ComfyUI's save nodes have a bad habit of assuming the folder you want already exists - and if it doesn't, your queue dies with a silent write failure or you end up with files scattered in the wrong place. Putting this node at the front of a workflow that writes outputs to a dated or per-run path is a cheap way to never think about it again.
It's an output node, so it doesn't feed the graph data - it just does a thing on the side and reports back what it did.
How it works
Give it a path (multiline, so you can paste multi-level paths like D:/renders/2026/project_x). The node then does something quietly clever: if the path's last segment contains a dot, it assumes you meant a file path and creates the parent directory; otherwise it creates the path itself as a directory. So both D:/renders/2026/project_x and D:/renders/2026/project_x/out.png end up making sure D:/renders/2026/project_x/ exists. It uses os.makedirs(..., exist_ok=True), so it won't error if the directory is already there - idempotent, safe to run every time.
The single input is path (STRING, multiline). There are no outputs; it returns UI text showing either Directory created: ... or an error string, which you'll see in the node's status.
Installing it
Pack-level install as usual: search JNK in ComfyUI Manager, or
cd ComfyUI/custom_nodes/
git clone https://github.com/Aljnk/ComfyUI-JNK-Tiny-Nodes.git
No dependencies beyond the stdlib - the pack's pip packages (opencv, pygame, google-genai) aren't needed here.
Where people get burned
Two things. First, paths are relative to wherever ComfyUI is running. If you type a relative path, you'll get the directory relative to your ComfyUI working directory, which may not be where you think. Use absolute paths for anything you care about, and if you're building the path from other nodes - say, joining a root with a timestamp from Get Timestamp or a model name from the "with Name" nodes - make sure that root is absolute too.
Second, the dot heuristic is a heuristic. A directory named v2.0 ends in a dot-containing segment, so the node will treat it as a file path and create its parent instead. Edge case, but it's bitten people who version their folders. If your folder name has dots in it, add a trailing slash or otherwise make it unambiguous. Minor stuff, but it's the difference between a node that "just works" and one that mysteriously creates v2 when you asked for v2.0.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| path | STRING | β |
Outputs (0)
No outputs