Nodes/comfyui-file-browser/πŸ“ File Browser
ComfyUI Node

πŸ“ File Browser

A real file manager that rides inside your ComfyUI graph

By sigsonΒ·Created 7 months agoΒ·Updated 7 months agoΒ· 0
πŸ“ File Browser
  • trigger
  • file_path
  • directory_path
β—„pathβ–Ί

ComfyUI runs a web UI, so it's a little embarrassing that moving files in and out of it is such a chore. The built-in upload button only exists on LoadImage (and dumps into input/), nothing lets you browse models/checkpoints from the browser, and deleting or renaming a model means SSH, or a second file-manager app, or fiddling with the host's filesystem. This pack drops a small file manager right into the canvas: browse the whole ComfyUI directory, upload by drag-and-drop, download, rename, delete, even create folders and empty files - without leaving the graph. If you run ComfyUI on a headless box or a shared server, that's genuinely the difference between a two-minute task and an afternoon of scp.

Fair warning up front: it's an obscure little thing. One commit, one maintainer, zero impressions on the registry, no community lore to speak of. It's a utility you reach for when the situation calls for it, not a pack anyone argues about.

How it works

The mechanism is simpler than the UI suggests. The Python half registers a handful of API routes on ComfyUI's own server (/file_browser/list, /upload, /download, /delete, /rename, ...), all rooted at BASE_DIR - which, tracing the path math, is your ComfyUI install folder, not just custom_nodes. Any path you navigate is resolved against that root and rejected if it tries to escape, so you can browse models, output, input, and custom_nodes but not the rest of your disk.

The frontend half is a DOM overlay: the JS builds a little file-manager panel, positions it over the node on the canvas, and keeps it glued there as you zoom and pan. Navigate into models/checkpoints, and the panel writes the current relative path back into the node's path widget. When the workflow runs, the node just returns that path as a string. That's the whole trick - a file browser whose "current folder" becomes a value your graph can consume.

The inputs and outputs that matter

  • path (required string, defaults to ""): the folder the browser is showing. You rarely type here - navigating in the panel updates it for you. Leave it empty and you start at the ComfyUI root.
  • trigger (optional, any type): a wildcard input you can poke to force the node to re-emit. ComfyUI caches output nodes aggressively, so if the path widget didn't change but you want the path re-emitted anyway, wire something into this.

Both outputs, file_path and directory_path, are STRING, and in the current code they carry the same value: the absolute path of the folder you're browsing. The naming implies "picked file" vs "picked folder," but there's no single-file selection concept here - don't overthink it. Wire whichever into a loader, saver, or any node that takes a path string and wants to know where you're standing.

Install

Boring and painless, no model downloads, no extra Python deps - it only uses aiohttp and the PromptServer that ship with ComfyUI, so there's no requirements.txt to go wrong. Via ComfyUI Manager, search "comfyui-file-browser." Or:

cd ComfyUI/custom_nodes
git clone https://github.com/sigson/comfyui-file-browser

Then restart ComfyUI. The node shows up under utils as "πŸ“ File Browser."

Common issues

The real gotchas are both upstream of the pack. First, the overlay is built against the classic LiteGraph frontend - it reads node.pos and canvas scale directly and renders a floating DOM panel. If you've opted into ComfyUI's Nodes 2.0 frontend, this is exactly the kind of overlay node that breaks; the Nodes 2.0 rewrite famously mangled rgthree's rendering, and a canvas-positioned panel like this one is in the blast radius. It works fine on the default/legacy canvas.

Second, and more important: the pack's routes are unauthenticated, like ComfyUI's API in general. Anybody who can reach your ComfyUI port can upload files into it, download anything under the root, or delete from it. That's the same exposure the community's "PSA: secure your ComfyUI instance" warnings hammer on - keep the port behind a VPN or reverse-proxy auth if you expose the machine at all. The path-safety check confines damage to the ComfyUI folder, but wiping your models directory is bad enough on its own.

Categoryutils

Inputs (2)

NameTypeDefaultDescription
pathSTRINGβ€”
triggeropt*β€”

Outputs (2)

NameTypeDescription
file_pathSTRINGβ€”
directory_pathSTRINGβ€”