Skip to content

SJK-py/lemonade-image-studio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lemonade Image Studio 🎨

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.

Screenshot

lemonade-image-studio-screenshot

Features

  • 4-Pane Layout: A responsive grid layout optimized for workflow:
  1. Generator: Configure prompts, models, steps, and dimensions.
  2. Collection: Browse folders, manage collections, and view thumbnails.
  3. Result: Immediate preview and action menu for the just-generated image.
  4. Viewer: Compare, rename, or move existing images from your library.
  • Collection Management: Create, rename, delete, and download entire collections as .zip files 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_KEY for secure connections to remote Lemonade servers.

Prerequisites

  • Python 3.8+
  • A running instance of Lemonade Server with image models (e.g., SDXL-Turbo, SD-1.5) installed.

Installation

  1. Clone or download the lemonade_img_studio.py and requirements.txt file to your directory (e.g., /opt/lemonade-img-studio).
  2. Create a virtual environment:
python3 -m venv venv
  1. Activate the environment:
source venv/bin/activate
  1. Install dependencies:
pip install -r requirements.txt

Usage

Manual Start

Ensure your virtual environment is active, then run:

python lemonade_img_studio.py

By 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.

Workflow Guide

  1. Select a Model: Use the dropdown in the top-left pane. The studio filters for models with image, sd-cpp, or flux tags/recipes.
  2. Choose a Collection: Use the top-right pane to select a target folder (e.g., "Default" or create a new one).
  3. 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.
  1. 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.

Running as a Service (Systemd)

To run the Image Studio in the background on Linux:

  1. Create the service file:
sudo nano /etc/systemd/system/lemonade-img-studio.service
  1. 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
  1. Enable and Start:
sudo systemctl daemon-reload
sudo systemctl enable lemonade-img-studio
sudo systemctl start lemonade-img-studio

License

MIT

About

A feature-rich, single-file Web UI studio for generating and managing images with Lemonade Server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages