os.path.abspath
Os.path.abspath as a node — turn relative paths into absolute ones
- path_in
- path
Ovum Os Path Abspath is a thin, faithful wrapper around Python's os.path.abspath, exposed as a ComfyUI node. You feed it a path string and it returns the normalized absolute version - resolved against the current working directory, . and .. collapsed, redundant slashes cleaned up. If you've ever wired a saver's output path into a downstream tool and watched it fail because the path was relative, this is the node that makes that go away.
It's part of a big family: the pack wraps a dozen-plus os.path functions (basename, dirname, exists, expanduser, and so on), all sharing the same pattern. Once you've used one, you've used them all. They're boring in the best way - no state, no configuration beyond the path itself, just Python's battle-tested path logic sitting in your graph.
How it works
The mechanism is a pass-through to the stdlib. Most of these nodes share a _FirstArgPathBase base class: you get a path text widget and an optional path_in input jack that accepts a PATHLIKE,STRING - meaning you can type a path or wire one from another node. If path_in is connected, it wins over the widget. Here, the result of os.path.abspath() is optionally run through a forward_slashes normalization (backslashes become forward slashes) before being returned as a string.
The inputs and outputs that matter
- path (required, STRING) - the path to absolutize.
- path_in (optional, PATHLIKE,STRING) - wired path input; overrides the widget.
- forward_slashes (BOOLEAN, default false) - normalize separator characters in the output. Turn this on if you're handing paths to something that chokes on Windows backslashes.
- path (output, STRING) - the absolute, normalized path.
Installing it
Part of comfy-ovum (sfinktah). ComfyUI Manager: search "comfy-ovum", install, restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/sfinktah/comfy-ovum
Restart after cloning. No models to download; the pack's dependencies are light (pillow, numpy, requests, aiohttp, etc.) and Manager handles them.
Common issues
Two things to remember. First, "absolute" is relative to ComfyUI's working directory, which is wherever you launched the server from - usually the ComfyUI install root, but if you launch from elsewhere, the resolved paths shift. os.path.realpath (also in this pack) is the one to use if you need symlinks resolved to their true target. Second, abspath does not check that the file exists - it's pure string normalization, so a typo produces a perfectly "absolute" path that doesn't exist. Pair it with OvumOsPathExists if you need to validate.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| path | STRING | — | |
| forward_slashes | BOOLEAN | false | — |
| path_inopt | PATHLIKE,STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| path | STRING | — |