LightDiffusion is an innovative tool designed for generating high-quality images from text prompts, leveraging cutting-edge machine learning techniques to simplify and enhance the creative process. Built on the principles of stability, efficiency, and user-friendliness, LightDiffusion empowers users to effortlessly produce detailed and high-resolution images.
Key Features
LightDiffusion boasts an impressive array of features designed to streamline and enhance the image generation process:
Txt2Img and Img2Img: Generate images from scratch using text prompts or transform existing images creatively.
Custom Models: Utilize custom models to achieve unique and personalized results tailored to your specific needs.
SD1.5 and Flux Models: Benefit from the speed and efficiency of the SD1.5 or the precision and quality of the quantized Flux model, depending on the version you choose.
Quantization: Utilizes Q8 quantization to reduce the model size and improve performance, enabling faster and more efficient image generation.
Attention Syntax: Fine-tune the focus of your prompts using attention syntax, allowing for more precise and controlled image generation.
Hires-Fix: Enhance the resolution of generated images without sacrificing detail, ensuring crisp and visually appealing results.
GPU Optimization: Utilize the power of GPU acceleration for significantly faster image generation, reducing processing time.
Adetailer: Enhance the details and sharpness of your images with the Adetailer feature, which will use automatically use a yolov6 model to refine the faces and bodies in the image.
Xformers and Pytorch Optimization: Experience improved performance and efficiency through the integration of Xformers and Pytorch optimization techniques.
Stable-Fast Implementation: Achieve up to 70% speedup in model inference with the stable-fast implementation, enabling rapid image generation.
FP16 and FP32 Precision Support: Automatically selects the optimal precision mode for your hardware, balancing performance and quality.
GUI: Enjoy a user-friendly graphical interface that simplifies interaction and makes the image generation process intuitive.
TAESD Image Previewing: Preview the image generation process in real-time using a Tiny Auto Encoder.
Automatic Prompt-Enhancing: Enhance your prompts automatically using locally hosted llama3.2, improving the quality and relevance of generated images.
Discord Bot Integration: Seamlessly use LightDiffusion directly within Discord, integrating image generation into your DMs.
Low VRAM and CPU Support: Generate images with as little as 2GB of VRAM, or even without a GPU.
Installation Guide
Prerequisites
Before you begin, ensure you have the following installed:
Python 3.10.6
Git
At least 10GB of free space on your hard drive
Installation Steps
1. Clone the Repository
Open your terminal and run the following command to clone the repository:
git clone https://github.com/Aatrick/LightDiffusion.git
cd LightDiffusion
2. Run the Application
2.1 Windows
Open a command prompt and execute the run.bat file to start the application:
./run.bat
2.2 Linux
Open a terminal and execute the run.sh file to start the application:
./run.sh
3. Add Model Checkpoints
Download your SD1/1.5 safetensors model and place it in the checkpoints directory.
Usage Instructions
LightDiffusion offers a wide range of features and customization options. To effectively harness its capabilities, consult the comprehensive Prompting Guide and HiresFix & Adetailer Guide provided in the documentation. These guides provide detailed instructions and insights on how to utilize these features to generate stunning and unique images.
Inference benchmarks
The following table compares the inference speeds of different image generation tools for a 512x512 image using MeinaMix-SD1.5 on an RTX 3060 laptop GPU with the dpmpp-2m-sde karras sampler:
Tool
Speed (it/s)
LightDiffusion with Stable-Fast
9.2
LightDiffusion
7.8
ComfyUI
7.1
SDWebUI
6.6
Conclusion
LightDiffusion presents a powerful and user-friendly solution for generating high-quality images from text prompts. With its intuitive interface, advanced features, and focus on efficiency, LightDiffusion empowers users of all levels to unlock their creative potential and bring their visual ideas to life.
Next Steps
LightDiffusion-Next is the follow up to LightDiffusion, which aims to further enhance the capabilities, readability and performance of the tool. It will also merge the LightDiffusion SD1.5 and Flux versions into a single, unified platform.
Stay tuned for updates and announcements regarding LightDiffusion-Next, and continue exploring the possibilities of AI-driven image generation with LightDiffusion.