Real-Time-Latent-Consistency-Model  by radames

App for real-time diffusion model pipelines using Diffusers

Created 1 year ago
909 stars

Top 40.1% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a real-time demonstration of Latent Consistency Models (LCM) for image generation and manipulation, targeting users interested in live diffusion model applications. It enables rapid image-to-image and text-to-image generation with features like ControlNet and LoRA integration, offering a fast and interactive experience.

How It Works

The application leverages the Diffusers library to implement various LCM pipelines, including SD Turbo and ControlNet integrations. It utilizes a MJPEG stream server for real-time webcam input and displays generated images. The core advantage lies in LCM's ability to achieve high-quality results with significantly fewer inference steps (as low as 4), enabling near real-time performance.

Quick Start & Requirements

  • Install: uv venv --python=3.10, activate, uv pip install -r server/requirements.txt, cd frontend && npm install && npm run build && cd .., then python server/main.py --reload --pipeline img2imgSDTurbo.
  • Prerequisites: CUDA, Python 3.10, Node.js > 19, webcam. Mac with M1/M2/M3 or Intel Arc GPU is also supported.
  • Docker: docker build -t lcm-live . and docker run -ti -p 7860:7860 --gpus all lcm-live.
  • Docs: Hugging Face Spaces

Highlighted Details

  • Showcases multiple real-time diffusion model pipelines.
  • Supports LCM Image-to-Image, Text-to-Image, ControlNet (Canny), and LoRA integrations.
  • Offers pipelines for SDXL and SD Turbo for faster inference.
  • Includes options for Torch Compile, Tiny Autoencoder, and Stable Fast.

Maintenance & Community

The project is maintained by radames. Links to demos and related models are provided on the Hugging Face Hub.

Licensing & Compatibility

The repository does not explicitly state a license in the README. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

The project is presented as a demo and may not be production-ready. Specific performance claims are not benchmarked. The README does not detail error handling or scalability for high-load scenarios.

Health Check
Last Commit

4 months ago

Responsiveness

Inactive

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

Explore Similar Projects

Starred by Yineng Zhang Yineng Zhang(Inference Lead at SGLang; Research Scientist at Together AI), Rodrigo Nader Rodrigo Nader(Cofounder of Langflow), and
1 more.

DiffSynth-Studio by modelscope

0.9%
10k
Open-source project for diffusion model exploration
Created 1 year ago
Updated 15 hours ago
Feedback? Help us improve.