Draw2Img  by GradientSurfer

Web UI for interactive, text-guided image generation

created 1 year ago
338 stars

Top 82.6% on sourcepulse

GitHubView on GitHub
Project Summary

Draw2Img provides a user-friendly, web-based interface for interactive image-to-image generation using text prompts. It's designed for users of all skill levels, enabling local, private, and offline creative image manipulation with features like an interactive canvas and real-time generation.

How It Works

The project utilizes a multi-threaded Python websocket server to handle requests and serve a Vue 3 front-end. Image generation is powered by SDXL-Turbo, performing text-guided transformations on a 512x512 canvas. While the server is multi-threaded, a mutex protects the non-thread-safe SDXL-Turbo pipeline, effectively serializing image generation requests. This design prioritizes simplicity and local hosting over high concurrency.

Quick Start & Requirements

  • Install via pip: pip install .
  • Run server: python draw2img/main.py
  • Recommended: GPU with 10 GB VRAM. CPU-only is supported but slower.
  • OS: Linux, Mac, Windows.
  • Python: 3.10 to 3.11.
  • Browser: Modern browser.
  • Internet: Not required after initial model download.
  • Docker: Provided Dockerfile available. Mount Hugging Face cache for efficiency.
  • Docs: https://github.com/GradientSurfer/Draw2Img

Highlighted Details

  • Real-time text-guided image-to-image generation with SDXL-Turbo.
  • Interactive canvas with basic paint tools and color picker.
  • Exports images and generation parameters (prompt, seed, steps, strength) as JSON.
  • Supports multiple concurrent users via a multi-threaded server.
  • Local, private, and offline operation.

Maintenance & Community

Contributions are welcome. The project is maintained by GradientSurfer.

Licensing & Compatibility

MIT License for the Draw2Img code. Use of SDXL-Turbo is subject to the Stability AI Non-Commercial License and its acceptable use policy.

Limitations & Caveats

Image generation is effectively single-threaded due to pipeline mutexes, limiting concurrency performance. There is no safety filter for offensive content. For advanced features, projects like Stable Diffusion Web UI or ComfyUI are recommended.

Health Check
Last commit

1 year ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
7 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.