Version: v1.2
A feature-rich, single-file Web UI studio for generating and managing images with Lemonade Server.
This tool provides a 4-pane workflow (Generator, Collection, Result, Viewer) to interact with Stable Diffusion or other image models hosted on your local Lemonade instance. It includes full asset management, thumbnail generation, and persistent parameter defaults.
- 4-Pane Layout: A responsive grid layout optimized for workflow:
- Generator: Configure prompts, models, steps, and dimensions.
- Collection: Browse folders, manage collections, and view thumbnails.
- Result: Immediate preview and action menu for the just-generated image.
- Viewer: Compare, rename, or move existing images from your library.
-
Collection Management: Create, rename, delete, and download entire collections as
.zipfiles directly from the UI. -
Asset Operations: Rename, move, delete, and download individual images.
-
Smart Defaults: * Gen(Default): One-click generation using the default settings.
-
Gen(Custom): Override specific parameters (CFG, Steps, Size).
-
Persistence: Save your preferred settings per model to
default_param.json. -
Thumbnails: Automatic, on-the-fly thumbnail generation for fast browsing.
-
Responsive Design: Desktop-first "Dashboard" view that adapts to a vertical layout on mobile devices.
-
Authentication Support: Supports
LEMONADE_KEYfor secure connections to remote Lemonade servers.
- Python 3.8+
- A running instance of Lemonade Server with image models (e.g., SDXL-Turbo, SD-1.5) installed.
- Clone or download the
lemonade_img_studio.pyandrequirements.txtfile to your directory (e.g.,/opt/lemonade-img-studio). - Create a virtual environment:
python3 -m venv venv- Activate the environment:
source venv/bin/activate- Install dependencies:
pip install -r requirements.txtManual Start
Ensure your virtual environment is active, then run:
python lemonade_img_studio.pyBy default, the web UI will be accessible at http://localhost:9001.
Environment Variables
You can configure the studio by setting environment variables before running the script:
| Variable | Default | Description |
|---|---|---|
LEMONADE_BASE |
http://localhost:8000 |
Base URL of the Lemonade Server API. |
LEMONADE_KEY |
(empty) | API Key (Bearer Token) if Lemonade Server requires auth. |
IMG_STUDIO_HOST |
0.0.0.0 |
Interface to bind the Studio UI to. |
IMG_STUDIO_PORT |
9001 |
Port to run this Web UI on. |
COLLECTION_PATH |
./collections |
Directory where generated images are stored. |
THUMB_PATH |
./studio-thumb |
Directory where thumbnails are cached. |
IMG_PARAMS_FILE |
default_param.json |
JSON file storing user parameter preferences. |
TIMEOUT_GEN |
600.0 |
Timeout (seconds) for image generation requests. |
- Select a Model: Use the dropdown in the top-left pane. The studio filters for models with
image,sd-cpp, orfluxtags/recipes. - Choose a Collection: Use the top-right pane to select a target folder (e.g., "Default" or create a new one).
- Generate:
- Click Gen(Default) to use the server's or saved defaults.
- Click Gen(Custom) to use the specific Steps/Size/CFG entered in the inputs.
- Manage:
- The Result pane shows the fresh image. You can immediately Rename (
Ren) or Move (Mov) it. - Clicking any image in the Collection grid opens it in the Selected pane for comparison or management.
To run the Image Studio in the background on Linux:
- Create the service file:
sudo nano /etc/systemd/system/lemonade-img-studio.service- Paste the configuration (adjust paths/user):
[Unit]
Description=Lemonade Image Studio
After=network.target
[Service]
Type=simple
User=your_username
Group=your_username
# Adjust path to your installation
WorkingDirectory=/opt/lemonade-img-studio
# Use python from the venv
ExecStart=/opt/lemonade-img-studio/venv/bin/python lemonade_img_studio.py
Restart=on-failure
RestartSec=5
# Environment Config
Environment=LEMONADE_BASE=http://localhost:8000
Environment=IMG_STUDIO_PORT=9001
# Environment=COLLECTION_PATH=/mnt/data/ai-images
[Install]
WantedBy=multi-user.target- Enable and Start:
sudo systemctl daemon-reload
sudo systemctl enable lemonade-img-studio
sudo systemctl start lemonade-img-studioMIT