Say hi to LightDiffusion-Next π¶
LightDiffusion-Next is the fastest AI-powered image generation GUI/CLI, combining speed, precision, and flexibility in one cohesive tool.
As a refactored and improved version of the original LightDiffusion repository, this project enhances usability, maintainability, and functionality while introducing a host of new features to streamline your creative workflows.
Motivation:¶
LightDiffusion was originally meant to be made in Rust, but due to the lack of support for the Rust language in the AI community, it was made in Python with the goal of being the simplest and fastest AI image generation tool.
That’s when the first version of LightDiffusion was born which only counted 3000 lines of code, only using Pytorch. With time, the project grew and became more complex, and the need for a refactor was evident. This is where LightDiffusion-Next comes in, with a more modular and maintainable codebase, and a plethora of new features and optimizations.
π Learn more in the official documentation.
π Highlights¶
LightDiffusion-Next offers a powerful suite of tools to cater to creators at every level. At its core, it supports Text-to-Image (Txt2Img) and Image-to-Image (Img2Img) generation, offering a variety of upscale methods and samplers, to make it easier to create stunning images with minimal effort.
Advanced users can take advantage of features like attention syntax, Hires-Fix or ADetailer. These tools provide better quality and flexibility for generating complex and high-resolution outputs.
LightDiffusion-Next is fine-tuned for performance. Features such as Xformers acceleration, BFloat16 precision support, WaveSpeed dynamic caching, and Stable-Fast model compilation (which offers up to a 70% speed boost) ensure smooth and efficient operation, even on demanding workloads.
β¨ Feature Showcase¶
Hereβs what makes LightDiffusion-Next stand out:
-
Speed and Efficiency: Enjoy industry-leading performance with built-in Xformers, Pytorch, Wavespeed and Stable-Fast optimizations, achieving up to 30% faster speeds compared to the rest of the AI image generation backends in SD1.5 and up to 2x for Flux.
-
Automatic Detailing: Effortlessly enhance faces and body details with AI-driven tools based on the Impact Pack.
-
State Preservation: Save and resume your progress with saved states, ensuring seamless transitions between sessions.
-
Advanced GUI, WebUI and CLI: Work through a user-friendly graphical interface as GUI or in the browser using Gradio or leverage the streamlined pipeline for CLI-based workflows.
-
Integration-Ready: Collaborate and create directly in Discord with Boubou, or preview images dynamically with the optional TAESD preview mode.
-
Image Previewing: Get a real-time preview of your generated images with TAESD, allowing for user-friendly and interactive workflows.
-
Image Upscaling: Enhance your images with advanced upscaling options like UltimateSDUpscaling, ensuring high-quality results every time.
-
Prompt Refinement: Use the Ollama-powered automatic prompt enhancer to refine your prompts and generate more accurate and detailed outputs.
-
LoRa and Textual Inversion Embeddings: Leverage LoRa and textual inversion embeddings for highly customized and nuanced results, adding a new dimension to your creative process.
-
Low-End Device Support: Run LightDiffusion-Next on low-end devices with as little as 2GB of VRAM or even no GPU, ensuring accessibility for all users.
β‘ Performance Benchmarks¶
LightDiffusion-Next dominates in performance:
Tool | Speed (it/s) |
---|---|
LightDiffusion with Stable-Fast | 2.8 |
LightDiffusion | 1.8 |
ComfyUI | 1.4 |
SDForge | 1.3 |
SDWebUI | 0.9 |
(All benchmarks are based on a 1024x1024 resolution with a batch size of 1 using BFloat16 precision without tweaking installations. Made with a 3060 mobile GPU using SD1.5.)
With its unmatched speed and efficiency, LightDiffusion-Next sets the benchmark for AI image generation tools.
π Installation¶
To get started with LightDiffusion, follow the installation guide which provides detailed steps for setting up the project on your system.
Usage¶
LightDiffusion-Next offers a variety of features and customization options. Refer to the Prompting Guide and HiresFix & Adetailer Guide for detailed instructions on how to use these features effectively.
Community and Support¶
Join our community on GitHub to share your creations, report issues, and contribute to the project. Check out the FAQ for common questions and troubleshooting tips.
Contributing¶
We welcome contributions from the community. If you’re interested in contributing, please read our contributing guidelines to get started.
License¶
LightDiffusion-Next is released under the GNU GPLv3. Feel free to use, modify, and distribute this software in accordance with the license terms.
Thank you for using LightDiffusion! We hope you enjoy creating amazing visuals with our tool.