Gallery4ComfyUI
The Do-Nothing Node That's Actually a Full Image Gallery
Don't let the name fool you. Gallery4ComfyUIOpener is a node that does nothing - no computation, no outputs, it doesn't even touch your image. But the "打开图库" / Open Gallery button stuck on its face opens a genuinely useful thing: a self-hosted image gallery for everything you've generated. It's the whole pack disguised as a utility node.
Why does that matter? ComfyUI's default relationship with your output folder is "go pick a file." Once you've generated a few thousand images, that's miserable. This gallery indexes your ComfyUI output directory (and optionally your Stable Diffusion WebUI outputs folder) and lets you actually search it - by filename, positive or negative prompt, model, sampler, steps, CFG, and size - with sorting, pagination, a lightbox that shows the seed/steps/CFG/sampler/model badges straight from the file's embedded metadata, and multi-folder favorites. It's the itch every "I want to find that one image from last week" post scratches, just delivered inside ComfyUI instead of as a separate app.
How it actually works
The node is a no-op that wires to a JavaScript extension. When you add it and hit the button, the JS calls ComfyUI's /gallery4comfyui/api/boot endpoint - which kicks off a background scan of your output folder - then opens the gallery at /gallery4comfyui/ in a new tab. The whole app, index, search, and lightbox are served by ComfyUI's own aiohttp server: no separate service, no API key, nothing to keep alive. Zero third-party dependencies; it only uses aiohttp and folder_paths that ship with ComfyUI. There are no model files to download, which after some packs is a relief.
The scan reads your PNGs' embedded text chunks (the same workflow/prompt metadata that lets you drag a PNG back onto the canvas - and the A1111 parameters string for the WebUI tab) and caches an index in custom_nodes/Gallery4ComfyUI/userdata/. It's incremental: files are matched by mtime and size, so after the first build, reopening only re-parses new or changed images and is effectively instant.
The inputs that matter
There's exactly one, and it's a trap:
webui_url(STRING, default"") - the name says "WebUI URL," but that's a lie. It's the URL the Open Gallery button opens. Leave it empty and the button opens/gallery4comfyui/; type something there and the button opens that instead. Beginners should just leave it blank.
No outputs, and OUTPUT_NODE is true - it's a trigger/utility node, so nothing wires into it or out of it. It lives under the Gallery category.
Installing it
Via ComfyUI Manager, search for Gallery4ComfyUI or Gallery-for-ComfyUI, or clone it directly:
cd ComfyUI/custom_nodes
git clone https://github.com/ainghhh/Gallery-for-ComfyUI
Then restart ComfyUI. Folder name doesn't matter - the release zip extracts as Gallery4ComfyUI while git clone gives you Gallery-for-ComfyUI, and both work because the pack uses relative imports. On first open it'll ask you to point at an SD WebUI root folder (the one containing outputs). Skip it. That's an optional source; the ComfyUI tab works fine alone, and you can configure it later via the ⚙ button.
Where people get burned
- First open is slow. Indexing tens of thousands of images takes a few minutes; that's the progress bar at the top. It's a one-time cost, and it's lazy - nothing scans at boot, so this pack adds zero startup overhead.
- Only your default output directory is scanned. If you save to a custom folder via a custom SaveImage node, those images won't show up. There's no per-folder configuration for the ComfyUI source yet.
- Fullscreen mode needs a browser with the Fullscreen API (Chrome/Edge/Firefox are fine).
- Uninstall is genuinely clean - everything lives in the plugin's
userdata/, so deleting the folder removes it all. The indexes rebuild next use.
Is it the most feature-complete gallery in the ecosystem? No - the popular local galleries now do file management, video thumbnails, and batch editing. But for "browse, search, and actually find my generations" with zero dependencies and zero background cost, this one's shockingly good for a v1.0.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| webui_url | STRING | — |
Outputs (0)
No outputs