Get Absolute Path ๐
Turn a relative path into one your nodes can actually use
- absolute_path
GetAbsolutePath takes a path written relative to your ComfyUI install and expands it into a full absolute path. It's a tiny plumbing node, but it quietly fixes one of the most common "why isn't this working" moments with the file-operation nodes in this pack.
It's a "Common" utility in ComfyUI-MieNodes, MieMieeeee's pack.
Why you'd want it
The pack's file nodes - DeleteFiles, BatchRenameFiles, BatchEditTextFiles and friends - all want a directory or file path, and they ship with placeholder values like X://path/to/files. The natural thing is to type a relative path (input/my_dataset) because it's portable and short. The catch is that a relative path resolves against whatever the current working directory happens to be at the time - and on a remote box, a serverless GPU, or just a differently-configured install, "the current directory" is not always what you pictured. So the file op runs, points somewhere you didn't expect, and either does nothing or does the wrong thing.
GetAbsolutePath removes the guesswork. Feed it your relative path, and it hands back the fully-qualified absolute path anchored to the ComfyUI root - so you can see exactly where it points, and feed that unambiguous path into the node that's going to act on it. Given that most of these ops delete or overwrite files, "know exactly where this points before running it" is not a small thing.
How it works
relative_path(required, defaultinput/abc) - a path relative to the ComfyUI base directory.
The single output is absolute_path (STRING) - the resolved, fully-qualified path.
Wire absolute_path into the path/directory input of whichever file node you're driving, and while you're debugging, hang a ShowAnything node off it so you can read where it actually landed before you commit to a delete.
Installing it
Install the pack. ComfyUI Manager โ search ComfyUI-MieNodes (ComfyUI_MieNodes) โ install โ restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/MieMieeeee/ComfyUI-MieNodes
then restart. No model download. Nodes appear under the sheep-emoji ๐ MieNodes menu.
Common issues
It resolves against the ComfyUI root, not your home folder. A relative path is interpreted relative to where ComfyUI lives, so input/abc becomes .../ComfyUI/input/abc. If your files are somewhere else entirely, use an absolute path directly rather than fighting the relative resolution.
It doesn't create anything. The node just computes a string - it won't make the directory or check that the target exists. If a downstream file op reports "nothing matched," verify the resolved path with a ShowAnything node and confirm the folder is actually there on the host. This is a recurring troubleshooting theme with file nodes: the path was wrong, not the node.
Local vs remote surprises. The most common reason to reach for this at all is that a workflow that worked on your laptop stops finding files on a rented GPU. Absolute paths make that failure loud and fixable instead of silent.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| relative_path | STRING | input/abc | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| absolute_path | STRING | โ |