Skip to content

SmartGallery for ComfyUI is a fast, standalone, browser-based gallery that remembers how every image or video was generated. Workflow-aware search, prompt & model filtering, node summary, mobile-friendly and Docker-ready.

License

Notifications You must be signed in to change notification settings

biagiomaf/smart-comfyui-gallery

Repository files navigation

SmartGallery for ComfyUI

SmartGallery logo

A lightweight, local, browser-based gallery that remembers
exactly how every image or video was generated.

License Python Stars


What is SmartGallery?

SmartGallery turns your ComfyUI output folder into a fast, searchable, mobile-friendly web gallery.

Every generated file (image or video) is automatically linked to its exact ComfyUI workflow, even if:

  • ComfyUI is not running
  • the file was generated weeks or months ago
  • filenames are meaningless

Everything runs fully offline, locally, with no cloud and no tracking.

Who is this for?
ComfyUI users who generate a lot, iterate fast, and want to never lose a workflow again.


Why it exists

If you use ComfyUI seriously, you probably faced this:

  • Thousands of outputs with generic filenames
  • Forgotten workflows
  • Hard to search by what you actually remember
  • No usable way to browse from your phone

SmartGallery turns your output folder into a living memory of your creative process.


Screenshots

Desktop Interface
Desktop View
Fast, clean desktop gallery with workflow-aware search

Mobile Interface Node Summary
Mobile View Node Summary
Fully usable on mobile Instant workflow recall with visual node summary

Core Features

  • Search & Filter: Find files by prompt keywords, specific models/LoRAs, file extension, date range, and more.
  • Full Workflow Access: View node summary, copy to clipboard, or download JSON for any PNG, JPG, WebP,WebM or MP4.
  • Compare Mode: Professional side-by-side comparison tool for images and videos with synchronized zoom, rotate and parameter diff.
  • Link External Folders: Mount external hard drives or network paths directly into the gallery root.
  • Auto-Watch: Automatically refreshes the gallery when new files appear.
  • Batch Operations: Select multiple files to delete, move, or re-scan in bulk.
  • Fully Offline: Works even when ComfyUI is not running.
  • Cross-platform: Windows, Linux, macOS + Docker support.

Actively developed β€” frequent updates focused on real ComfyUI workflows.

What’s New in v1.54

This release introduces powerful new tools for analyzing images and managing external storage.

New Compare Mode Interface
New Compare Mode: Side-by-side view with Parameter Diff Table

  • NEW: Compare Mode: Select two images or videos to compare them side-by-side. Features a synchronized zoom/pan/rotate engine (move one image, the other follows) and a "Diff Table" that highlights exactly which parameters changed in the workflow (e.g., CFG, Steps, Seed).
  • NEW: Link External Folders: Mount folders from external drives, partitions, or network shares directly into SmartGallery. Includes a visual file browser and robust Windows linking that automatically handles Virtual Drives and Network Shares.
  • Enhanced Lightbox Info: The viewer now displays the exact Megapixel count (e.g., 16.8 MP - essential for checking upscales) and full directory details, including the real source path for linked external folders.
  • Mount Guard: A safety system that detects if a linked drive is offline at startup. It protects your database from deleting metadata (Favorites/Notes) until the drive is reconnected.
  • Quick Actions & Shortcuts: Speed up your workflow with new hotkeys:
    • Press T to toggle the Filter Panel instantly.
    • Hover + F to Quick Favorite.
    • Hover + DEL to Quick Delete (skips popup).
  • Smart Video Grid: Completely rewritten "Play/Pause on Scroll" engine. Videos strictly pause when leaving the viewport, drastically reducing CPU/GPU usage.
  • Auto-Consistency: The system forces a robust Full Sync on every startup to remove "ghost" files deleted externally via OS.

This is a curated summary β€” see the πŸ‘‰ full CHANGELOG for all technical changes.


Installation & Update

- Windows, macOS, Linux, Docker

Select your platform

Each quick install shows only the relevant steps for that platform.


Windows (Python)

1. Install

Option A: Using Git (Recommended)

git clone https://github.com/biagiomaf/smart-comfyui-gallery
cd smart-comfyui-gallery

Option B: No Git (Manual Download)

Download the latest Source code (zip) from Releases, extract it, and open a terminal inside the folder.

Then, setup the environment:

python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt

2. Run (Best Practice)

Create a new file named run_smartgallery.bat inside the folder and paste this content.

⚠️ IMPORTANT: Replace the example paths with your real paths. Use forward slashes / even on Windows.

@echo off
cd /d %~dp0
call venv\Scripts\activate.bat

:: --- CONFIGURATION ---
:: REPLACE these paths with your actual folders.
:: NOTE: Use forward slashes (/) for paths (e.g., C:/ComfyUI/output)

set "BASE_OUTPUT_PATH=C:/Path/To/ComfyUI/output"
set "BASE_INPUT_PATH=C:/Path/To/ComfyUI/input"
set "BASE_SMARTGALLERY_PATH=C:/Path/To/ComfyUI/output"

:: If ffmpeg is not in your system PATH, point to ffprobe.exe here:
set "FFPROBE_MANUAL_PATH=C:/Path/To/ffmpeg/bin/ffprobe.exe"
set SERVER_PORT=8189

:: --- START ---
python smartgallery.py
pause

Double-click run_smartgallery.bat to start.

3. How to Update

If you installed via Git:

cd smart-comfyui-gallery
git pull
venv\Scripts\activate
pip install -r requirements.txt

If you downloaded the ZIP: Download the new version, extract it, and copy your run_smartgallery.bat into the new folder.


macOS (Python)

1. Install

Option A: Using Git (Recommended)

git clone https://github.com/biagiomaf/smart-comfyui-gallery
cd smart-comfyui-gallery

Option B: No Git (Manual Download)

Download the latest Source code (tar.gz) from Releases, extract it, and open a terminal inside the folder.

Then, setup the environment:

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

2. Run (Best Practice)

Create a file named run_smartgallery.sh, make it executable (chmod +x run_smartgallery.sh), and paste this content:

#!/bin/bash
source venv/bin/activate

# Increase open files limit (fix for "Too many open files" on macOS)
ulimit -n 4096

# --- CONFIGURATION ---
# REPLACE these paths with your actual folders.
export BASE_OUTPUT_PATH="$HOME/ComfyUI/output"
export BASE_INPUT_PATH="$HOME/ComfyUI/input"
export BASE_SMARTGALLERY_PATH="$HOME/ComfyUI/output"

# Ensure ffprobe is installed (brew install ffmpeg)
export FFPROBE_MANUAL_PATH="/usr/bin/ffprobe"
export SERVER_PORT=8189

# --- START ---
python smartgallery.py

Run it with: ./run_smartgallery.sh

3. How to Update

cd smart-comfyui-gallery
git pull
source venv/bin/activate
pip install -r requirements.txt

If you downloaded the tar.gz: Download the new version, extract it, and copy your run_smartgallery.sh into the new folder.


Linux (Python)

1. Install

Option A: Using Git (Recommended)

git clone https://github.com/biagiomaf/smart-comfyui-gallery
cd smart-comfyui-gallery

Option B: No Git

Download Source code from Releases.

Then, setup the environment:

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

2. Run (Best Practice)

Create a file named run_smartgallery.sh, make it executable (chmod +x run_smartgallery.sh), and paste this content:

#!/bin/bash
source venv/bin/activate

# --- CONFIGURATION ---
# REPLACE these paths with your actual folders.
export BASE_OUTPUT_PATH="$HOME/ComfyUI/output"
export BASE_INPUT_PATH="$HOME/ComfyUI/input"
export BASE_SMARTGALLERY_PATH="$HOME/ComfyUI/output"
export FFPROBE_MANUAL_PATH="/usr/bin/ffprobe"
export SERVER_PORT=8189

# --- START ---
python smartgallery.py

Run it with: ./run_smartgallery.sh

3. How to Update

cd smart-comfyui-gallery
git pull
source venv/bin/activate
pip install -r requirements.txt

If you downloaded the source code manually: Download the new version, extract it, and copy your run_smartgallery.sh into the new folder.


Docker

1. Run

Replace the paths on the left side of the : with your actual host paths.

docker run \
  --name smartgallery \
  -v /your/host/output:/mnt/output \
  -v /your/host/input:/mnt/input \
  -v /your/host/SmartGallery:/mnt/SmartGallery \
  -e BASE_OUTPUT_PATH=/mnt/output \
  -e BASE_INPUT_PATH=/mnt/input \
  -e BASE_SMARTGALLERY_PATH=/mnt/SmartGallery \
  -p 8189:8189 \
  -e WANTED_UID=`id -u` \
  -e WANTED_GID=`id -g` \
  mmartial/smart-comfyui-gallery

2. How to Update

# 1. Pull the latest image
docker pull mmartial/smart-comfyui-gallery

# 2. Stop and remove the old container
docker stop smartgallery && docker rm smartgallery

# 3. Run the 'docker run' command again (see above)

🐳 Docker Deployment

Want to run SmartGallery in a containerized environment? We've got you covered!

πŸŽ–οΈ Special Thanks: A huge shout-out to Martial Michel for orchestrating the Docker support and contributing to the core application logic.

Docker deployment provides isolation, easier deployment, and consistent environments across different systems. However, it requires some familiarity with Docker concepts.

πŸ—„οΈ Pre-built images

Pre-built images are available on DockerHub at mmartial/smart-comfyui-gallery and Unraid's Community Apps.

assets/smart-comfyui-gallery-unraidCA.png

Full Docker guide: πŸ‘‰ docs/DOCKER_HELP.md


- Open SmartGallery

http://127.0.0.1:8189/galleryout

For advanced configuration: πŸ‘‰ Complete Installation Guide (Docker Compose, reverse proxy, ffmpeg, scripts, and more)


Experimental Features

Testing cutting-edge features before official releases?

The /experiments folder contains beta versions and hotfixes under active development.

⚠️ Experimental code β€” use at your own risk. Always backup before testing.


Optional AI Features (Planned)

SmartGallery is designed to stay lightweight by default.

Advanced AI-powered features (semantic search, natural language queries) will be provided by a separate optional service:

  • Fully optional
  • Runs locally
  • Separate Docker container or Python environment
  • No impact on the core gallery if not installed

The AI service is currently under development and not released yet.


Philosophy

  • Local-first
  • Privacy-first
  • Minimal dependencies
  • No forced upgrades
  • No vendor lock-in

Contributing & Feedback

Issues, ideas, and pull requests are welcome.


⭐ Support the Project

If SmartGallery improves your ComfyUI workflow, consider giving the repository a ⭐.

It helps visibility, motivates future development, and costs nothing.


License

MIT License β€” see LICENSE


Made for the ComfyUI community

About

SmartGallery for ComfyUI is a fast, standalone, browser-based gallery that remembers how every image or video was generated. Workflow-aware search, prompt & model filtering, node summary, mobile-friendly and Docker-ready.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Languages