Load Image By Path (Advanced)
The path loader for when ComfyUI lives on a server and your files don't
- IMAGE
- MASK
Same core as Load Image By Path, plus two extras aimed squarely at one annoying setup: ComfyUI running on a remote server while you edit files on a locally-mounted drive. The name isn't marketing - in the source, KLoadImageByPathAdvanced is the real implementation and the plain KLoadImageByPath just inherits from it.
What does "advanced" actually buy you? Two things the base node doesn't expose:
- Prefix substitution. A toggle plus two text fields. Set
enable_prefix_substitutionon, and any path you type that starts with theprefix_substitution_source(default/mnt/point/) gets that prefix rewritten toprefix_substitution_destination(default~/) before the file is loaded. The README's example is the whole story: the server sees your image at/mnt/point/dir/my image.jpg, your local machine has it mounted at~/dir/my image.jpg, you type the remote path, and the node silently translates it. No manual path surgery every time a workflow moves between machines. - A manual auto-refresh toggle.
auto_preview_updateswitches the watchdog-based preview refresh off. The base node always watches the file and refreshes; this one lets you stop that when the file you're pointing at is changing constantly and the constant re-previews are worse than the feature.
Everything else - the text image input, absolute-path validation, ~ expansion, quote stripping, IMAGE and MASK outputs - is identical to the base node.
Which one should you reach for?
Honest answer: the plain Load Image By Path, unless you actually have the remote-mount problem or want to disable auto-preview. The prefix rewrite exists because the author hit exactly this scenario, and if you haven't, the extra widgets are dead weight on the node. But if you are editing paths that differ between server and client - or sharing workflows with people whose mount points don't match yours - this is the node that makes those workflows portable without re-editing paths by hand.
How it works
The rewrite happens in the frontend, in the node's path widget, before the request goes out: it strips surrounding quotes, expands ~, and - if substitution is enabled and the path starts with the source prefix - swaps in the destination prefix. If the path doesn't start with the prefix, it logs a message and leaves the path alone; no silent mangling. The server then validates the file exists and generates a preview into ComfyUI's temp dir, same as the base node.
Installing it
Same pack, same story: kappa54m/ComfyUI_Usability via ComfyUI Manager (search "ComfyUI Usability"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/kappa54m/ComfyUI_Usability
cd ComfyUI_Usability
pip install -r requirements.txt # watchdog
Restart and it appears under the image category. No models, no heavy deps - the one real dependency is watchdog, and that only powers automatic preview refresh.
Gotchas
- Prefix substitution only fires when the path starts with the source prefix.
dir/my image.jpgisn't/mnt/point/dir/my image.jpg, and the node will just log and continue with the path unchanged. - The defaults assume the
~/convention. On Windows, the destination prefix probably wants to be a drive path, not~/. - Same run-time rules as the base node: absolute paths, file must exist when the node runs, ImageMagick needed for PSD/XCF previews, and no watchdog means no auto-refresh (with a console warning at startup).
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| MASK | MASK | — |