stablediffusion-infinity  by lkwq007

Web app for Stable Diffusion outpainting on infinite canvas

created 2 years ago
3,877 stars

Top 12.9% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides an infinite canvas web application for outpainting images using Stable Diffusion's inpainting model. It's designed for artists and creators looking to extend images beyond their original boundaries, offering a visual interface for seamless image generation.

How It Works

The application leverages Stable Diffusion's inpainting capabilities to fill masked or empty regions of an image. It employs a web app architecture built with PyScript and Gradio, allowing for browser-based execution. For improved seam suppression, it integrates photometric correction via the fpie library (Linux/macOS only). The core canvas is implemented using NumPy and PyScript, though this approach is noted as less efficient than pure frontend solutions.

Quick Start & Requirements

  • Install: pip install fpie (for photometric correction on Linux/macOS).
  • Run: python app.py
  • Docker: Available for Windows/Linux with NVIDIA GPU.
  • Prerequisites: Python, NVIDIA GPU (recommended for performance), CUDA >= 12 (implied by Docker usage).
  • Docs: setup_guide, run_with_docker, usage, FAQs.

Highlighted Details

  • Infinite canvas with browser-based outpainting.
  • Photometric correction for seam suppression (Linux/macOS).
  • Options to disable safety checker and use FP32 for compatibility.
  • init_mode parameter influences how masked regions are filled, with patch_match often yielding better results.

Maintenance & Community

Pull requests are welcomed for UI improvements, result enhancement ideas, and general contributions. Specific community links (Discord/Slack) or roadmap details are not provided in the README.

Licensing & Compatibility

The primary license is not explicitly stated, but the project notes that code from various sources with different licenses (e.g., MIT, Apache 2.0) is included. This may impose restrictions on commercial use or linking with closed-source projects.

Limitations & Caveats

The NumPy + PyScript canvas implementation is less efficient than frontend alternatives. The infinite canvas is practically limited by RAM and browser constraints, potentially leading to crashes at extreme zoom levels. Photometric correction may be unreliable due to multithreading issues with Taichi. Outpainting performance degrades significantly for selections larger than 512x512.

Health Check
Last commit

2 years ago

Responsiveness

Inactive

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

Explore Similar Projects

Feedback? Help us improve.