Self-hosted service
biagiomaf/smart-comfyui-gallery avatar
biagiomaf/smart-comfyui-gallery

SmartGallery DAM for ComfyUI: A Local-First Gallery You Can Query in Natural Language

SmartGallery DAM is a local-first, browser-based Digital Asset Manager for ComfyUI. Generate without opening ComfyUI. Query your gallery with AI, in natural language. Advanced file manager, filter by prompt, model, LoRA, date and comment. Status tags, ratings, virtual collections, client sharing. Mobile-friendly, cross-platform, Docker-ready.

407 stars47 forksHTMLMIT

At a glance

What is it?
SmartGallery DAM is a browser-based digital asset manager that indexes ComfyUI output folders, searches them by prompt, model or LoRA, and can queue new generations without opening the ComfyUI canvas. Here is how it installs, what it does well, and where it stops.
Who is it for?
Adopt SmartGallery DAM if your ComfyUI output folder has grown past the point where filenames mean anything and you want prompt-level search, status tags and client-facing collections without moving files. Skip it if you only need a read-only metadata viewer, or if you are unwilling to mount your model directories into a second container so LoRA Synergy and the Remix Engine can see them.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 36 days ago.
What is it written in?
Mainly HTML, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 22, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • biagiomaf/smart-comfyui-gallery407 ★ · +27
Star history
Repository2026-09-172026-11-22
biagiomaf/smart-comfyui-gallery380407

27 Stars in the last 66 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The problem SmartGallery DAM targets: a ComfyUI output folder that stopped being browsable

ComfyUI writes generated files into an output directory and leaves them there. After a few thousand generations, that directory is a flat pile of PNGs whose names carry no meaning, and the only reliable record of which checkpoint, LoRA or prompt produced a given image sits inside the file's embedded workflow metadata. The README states the project is aimed at people in exactly that position, including the creator with tens of thousands of generations scattered across drives and the studio that has to show work to clients.

The design decision that separates it from a ComfyUI extension is stated plainly in the README: SmartGallery DAM runs as an independent process, outside ComfyUI's environment, and keeps indexing whether ComfyUI is running, updating or uninstalled. There is no custom node and no shared dependency tree. That matters because a gallery that lives inside the tool it indexes inherits that tool's upgrade cycle. The trade-off is that independence is not free: a separate process needs its own port, its own container and its own view of your filesystem, which is why the compose file is longer than a typical extension install.

How indexing, OmniQuery and the Remix Engine actually fit together

The repository layout is small: a single smartgallery.py entry point, a templates directory, a requirements.txt listing Flask, Pillow, opencv-python, numpy, tqdm, werkzeug, markupsafe, pyOpenSSL, click, itsdangerous, blinker, cryptography and waitress. That is a Flask application served by waitress, with OpenCV and Pillow doing the image work. There is no database server in the dependency list, so the index is file-based and lives under the SmartGallery path you mount.

On top of that index sit four mechanisms the README names. Search resolves prompts, checkpoints, LoRAs (with live autocomplete), dates and comments. Clustering groups generations either by node architecture or by prompt text and marks the groups with #HASH badges. OmniQuery takes a plain-English request and, per the README, has an AI write the SQL query that answers it, which is the one feature in the list that depends on a model rather than on local parsing. The Remix Engine is described as a three-tier workspace: extract a workflow from an existing image, edit the raw node JSON with dictionary lookups, and queue it. LoRA Synergy scans Safetensors files locally to check checkpoint compatibility across SD1.5, SDXL and Flux, surfaces trigger words, and wires the workflow.

The ComfyUI Queue Deck, added in v2.23 and reworked in v2.24, is the newest piece. The release notes describe it as inspecting and managing generation queues, and the README adds step tracking, live stream preview and GPU/VRAM load behind the Shift+Q shortcut. Note the direction of data flow: SmartGallery reads your output folder for the gallery, but for queue management it talks to ComfyUI over the network, which is what COMFYUI_SERVER_URL in compose.yaml configures. The two halves can fail independently.

Installing SmartGallery DAM with Docker and indexing a first folder

The README points at two install routes: a zero-config portable app for Windows that you unzip and run, and an official Docker image published as mmartial/smart-comfyui-gallery. The compose.yaml in the repository is the reference for the Docker route. It maps port 8189 and mounts three paths, and the environment variables below the volumes tell the application where those mounts landed inside the container.

The three volume lines are the part you must edit. Replace the host paths on the left with your own ComfyUI output, input and SmartGallery directories; the container-side paths on the right are what the environment variables refer to.

yaml
services:
  comfy-smartgallery:
    image: mmartial/smart-comfyui-gallery:latest
    container_name: comfy-smartgallery
    ports:
      - 8189:8189
    volumes:
      - /comfyui-nvidia/basedir/output:/mnt/output
      - /comfyui-nvidia/basedir/input:/mnt/input
      - /comfyui-nvidia/SmartGallery:/mnt/SmartGallery
    restart: unless-stopped

The environment block is where the container learns about your filesystem and your ComfyUI instance. WANTED_UID and WANTED_GID should match the owner of the mounted directories; the compose file comments point you at id -u and id -g to obtain them. COMFYUI_SERVER_URL must be reachable from inside the container, so a ComfyUI running on the same host is not localhost from the container's point of view. The commented BASE_MODELS_PATH, LORAS_PATH and CHECKPOINTS_PATH lines are only needed for the LoRA Synergy and Remix features.

yaml
    environment:
      - BASE_OUTPUT_PATH=/mnt/output
      - BASE_INPUT_PATH=/mnt/input
      - BASE_SMARTGALLERY_PATH=/mnt/SmartGallery
      - WANTED_UID=1000
      - WANTED_GID=1000
      - COMFYUI_SERVER_URL=http://192.168.100.1:8188

With the file edited, bring it up with the usual compose command and open port 8189 in a browser. The README's Magic Upload feature also accepts drag and drop from a PC or phone, and it extracts and indexes workflows from whatever you drop, which is the fastest way to confirm that indexing works before you point it at a large archive.

bash
docker compose up -d
docker compose logs -f comfy-smartgallery

If the gallery comes up empty, the log output is the first place to look: a path mismatch between the host mount and BASE_OUTPUT_PATH produces an empty index rather than an error dialog, because an empty directory is a valid thing to index.

Where SmartGallery DAM is the wrong tool

The README does not document a rollback path for the SmartGallery folder, and it does not describe what happens to your index when you upgrade between the 2.22, 2.23 and 2.24 releases that appear in the release history. That is a real gap for anyone who has spent hours tagging and rating a large library, because the tags and ratings are stored in that folder rather than in your images. Back up the SmartGallery mount before upgrading, and treat the index as the asset it is.

The second boundary is file ownership. The Dockerfile creates smartgallery and smartgallerytoo users with UIDs 1024 and 1025 and runs as a non-root user, while the compose file defaults WANTED_UID and WANTED_GID to 1000. If your output directory is owned by a third UID, the container either cannot write or cannot read, and the only documented escape hatch is FORCE_CHOWN, which the compose file explicitly limits to the BASE_SMARTGALLERY_PATH folder. It will not repair permissions on your ComfyUI output tree.

Third, OmniQuery is the one feature whose behaviour depends on an external model writing SQL. The README does not describe which model, where it runs, or what it costs, and it does not document what happens when the generated query is wrong. If your library contains anything you would not send to a third-party service, resolve that question before enabling the feature rather than after.

Finally, if all you want is to read the workflow metadata embedded in a PNG, this is more machinery than the task requires. A single-file metadata viewer reads one image at a time and needs no container, no port and no mounted index.

How it differs from ComfyUI Image Gallery Extended and node-based galleries

The closest comparison in the search data is ComfyUI Image Gallery Extended, and the difference is architectural rather than feature-by-feature. A node-based gallery runs inside the ComfyUI process. It sees whatever ComfyUI sees, it starts when ComfyUI starts, and it stops when ComfyUI stops or when a node update breaks it. It also shares ComfyUI's Python environment, which is the environment where dependency conflicts are most likely to appear.

SmartGallery DAM inverts that. It is a Flask application served by waitress, packaged as its own image, with its own pinned dependency list in requirements.txt. It reaches ComfyUI over HTTP through COMFYUI_SERVER_URL rather than through Python imports. The practical consequence is that you can restart, upgrade or remove ComfyUI and the gallery keeps serving your library, which is the property the README leans on when it calls the project ComfyUI-aware but ComfyUI-independent.

That independence has a cost the node-based approach avoids entirely. A node sees ComfyUI's internal state directly; SmartGallery needs the network path to be correct and the model directories to be mounted read-only before LoRA Synergy can check compatibility. The commented volume lines in compose.yaml for /mnt/loras, /mnt/checkpoints and /mnt/unet exist precisely because the container cannot see those folders unless you mount them. If you want the smallest possible install and you never leave the ComfyUI canvas anyway, a node-based gallery is the shorter path.

Licence, versions and the cost of staying current

SmartGallery DAM is MIT licensed, and the LICENSE file sits at the top level of the repository. MIT is permissive: it allows commercial use and modification, and it requires that the copyright notice and licence text travel with redistributed copies. If you fork the project or ship it inside a product, keep that file. This is a description of the licence text, not legal advice; the terms that bind you are the ones in LICENSE.

The maintenance signal is straightforward. The repository is not archived, and the last push was on 2026-09-08, the same day release 2.24 landed. Releases 2.23 and 2.24 both landed in September 2026, with 2.22.1 before them in August. The cadence is visible in the release history, and the version number is carried in one place you should know about: the Makefile sets SMARTGALLERY_VERSION = 2.24, so anyone building their own image from source edits that line rather than renaming a tag by hand.

Upgrade cost is mostly operational. Pulling a new image and restarting the container is the mechanical part. The part the documentation does not cover is index migration between versions, and that is the thing to plan for. A dated copy of the SmartGallery folder before each upgrade is the cheapest insurance available, and it uses nothing but the mount you already configured.

Editorial conclusion

Adopt SmartGallery DAM if your ComfyUI output folder has grown past the point where filenames mean anything and you want prompt-level search, status tags and client-facing collections without moving files. Skip it if you only need a read-only metadata viewer, or if you are unwilling to mount your model directories into a second container so LoRA Synergy and the Remix Engine can see them. Before committing, verify three things against your own setup: that the paths you mount match BASE_OUTPUT_PATH, BASE_INPUT_PATH and BASE_SMARTGALLERY_PATH, that COMFYUI_SERVER_URL points at a reachable ComfyUI instance, and that WANTED_UID and WANTED_GID match the owner of your output directory, since the image runs as a non-root user and the compose file warns that FORCE_CHOWN applies only to the SmartGallery folder.

Frequently asked questions

Does SmartGallery DAM require a ComfyUI custom node?

No. The README states it runs as a fully independent process outside ComfyUI's environment, with no custom node and no shared dependencies, and it keeps indexing whether ComfyUI is up, down or uninstalled. It still needs COMFYUI_SERVER_URL to reach ComfyUI for queue management and generation features.

What are the default port and Docker image for SmartGallery DAM?

The compose.yaml in the repository maps port 8189 and uses the image mmartial/smart-comfyui-gallery:latest. The container name in the same file is comfy-smartgallery.

How does SmartGallery DAM find images by prompt or LoRA?

It indexes your ComfyUI output folder and searches by prompt, checkpoint, LoRA (with live autocomplete), date or comment, according to the README. Clustering can also group generations by node architecture or by prompt text.

Official sources

  1. biagiomaf/smart-comfyui-gallery on GitHub
  2. License: MIT
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/biagiomaf-smart-comfyui-gallery.svg)](https://hysenlabs.com/projects/biagiomaf-smart-comfyui-gallery)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/biagiomaf-smart-comfyui-gallery.svg)](https://hysenlabs.com/projects/biagiomaf-smart-comfyui-gallery)

Was this useful?