Stable-Diffusion
Stable Diffusion, SDXL, LoRA Training, DreamBooth Training, Automatic1111 Web UI, DeepFake, Deep Fakes, TTS, Animation, Text To Video, Tutorials, Guides, Lectures, Courses, ComfyUI, Google Colab, RunPod, NoteBooks, ControlNet, TTS, Voice Cloning, AI, AI News, ML, ML News, News, Tech, Tech News, Kohya LoRA, Kandinsky 2, DeepFloyd IF, Midjourney
Top Related Projects
High-Resolution Image Synthesis with Latent Diffusion Models
Stable Diffusion web UI
🤗 Diffusers: State-of-the-art diffusion models for image and audio generation in PyTorch and FLAX.
Invoke is a leading creative engine for Stable Diffusion models, empowering professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry leading WebUI, and serves as the foundation for multiple commercial products.
Quick Overview
FurkanGozukara/Stable-Diffusion is a GitHub repository that provides a comprehensive collection of tools, scripts, and resources for working with Stable Diffusion, a popular text-to-image generation model. The repository includes various implementations, optimizations, and utilities to enhance the Stable Diffusion experience for both beginners and advanced users.
Pros
- Extensive collection of tools and scripts for Stable Diffusion
- Regular updates and active maintenance
- Includes optimizations for improved performance
- Provides resources and guides for users of all skill levels
Cons
- Large repository size may be overwhelming for beginners
- Some advanced features may require additional setup or dependencies
- Documentation could be more structured and organized
- May require significant computational resources for optimal performance
Code Examples
- Loading and using a Stable Diffusion model:
from diffusers import StableDiffusionPipeline
import torch
model_id = "runwayml/stable-diffusion-v1-5"
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
pipe = pipe.to("cuda")
prompt = "A beautiful sunset over a calm ocean"
image = pipe(prompt).images[0]
image.save("generated_image.png")
- Applying textual inversion for custom concepts:
from diffusers import StableDiffusionPipeline
import torch
model_id = "path/to/fine_tuned_model"
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
pipe = pipe.to("cuda")
prompt = "A <custom-concept> in the style of Van Gogh"
image = pipe(prompt).images[0]
image.save("custom_concept_image.png")
- Using LoRA (Low-Rank Adaptation) for fine-tuning:
from diffusers import StableDiffusionPipeline
import torch
base_model_id = "runwayml/stable-diffusion-v1-5"
lora_model_id = "path/to/lora_model"
pipe = StableDiffusionPipeline.from_pretrained(base_model_id, torch_dtype=torch.float16)
pipe.unet.load_attn_procs(lora_model_id)
pipe = pipe.to("cuda")
prompt = "A portrait in the style of the LoRA model"
image = pipe(prompt).images[0]
image.save("lora_generated_image.png")
Getting Started
To get started with the FurkanGozukara/Stable-Diffusion repository:
-
Clone the repository:
git clone https://github.com/FurkanGozukara/Stable-Diffusion.git
-
Install the required dependencies:
pip install -r requirements.txt
-
Follow the instructions in the repository's README for setting up specific tools and scripts.
-
Run the desired script or use the provided notebooks to generate images with Stable Diffusion.
Competitor Comparisons
High-Resolution Image Synthesis with Latent Diffusion Models
Pros of stablediffusion
- Official repository maintained by Stability AI, ensuring up-to-date and reliable codebase
- Comprehensive documentation and examples for various use cases
- Active community support and regular updates
Cons of stablediffusion
- Steeper learning curve for beginners due to its extensive features
- Requires more computational resources for optimal performance
Code Comparison
stablediffusion:
from diffusers import StableDiffusionPipeline
pipe = StableDiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-2-1")
prompt = "a photo of an astronaut riding a horse on mars"
image = pipe(prompt).images[0]
image.save("astronaut_rides_horse.png")
Stable-Diffusion:
import modules.scripts
from modules import sd_samplers
from modules.processing import process_images
p = processing.StableDiffusionProcessing(...)
processed = process_images(p)
The stablediffusion repository provides a more streamlined API for generating images, while Stable-Diffusion offers more granular control over the generation process. stablediffusion is better suited for quick implementations, whereas Stable-Diffusion allows for more customization and fine-tuning of the image generation pipeline.
Stable Diffusion web UI
Pros of stable-diffusion-webui
- More extensive feature set, including advanced image generation options and a wider range of extensions
- Larger and more active community, resulting in frequent updates and improvements
- User-friendly web interface with intuitive controls and real-time previews
Cons of stable-diffusion-webui
- Steeper learning curve due to the abundance of features and options
- Higher system requirements, potentially slower on lower-end hardware
- More complex setup process, especially for users new to machine learning environments
Code Comparison
Stable-Diffusion:
def generate_image(prompt, steps=50, cfg_scale=7.5):
with torch.no_grad():
image = pipeline(prompt, num_inference_steps=steps, guidance_scale=cfg_scale).images[0]
return image
stable-diffusion-webui:
def generate_image(p, *args):
processed = process_images(p)
return processed.images[0] if len(processed.images) > 0 else None
The code snippets show that stable-diffusion-webui uses a more abstracted approach, potentially offering greater flexibility and customization options. However, this abstraction may make it less straightforward for beginners to understand and modify the core functionality.
🤗 Diffusers: State-of-the-art diffusion models for image and audio generation in PyTorch and FLAX.
Pros of diffusers
- More comprehensive library with support for multiple diffusion models
- Better documentation and integration with the broader Hugging Face ecosystem
- Active development and frequent updates
Cons of diffusers
- Steeper learning curve for beginners
- May require more setup and configuration for specific use cases
Code Comparison
Stable-Diffusion:
from stable_diffusion import StableDiffusion
sd = StableDiffusion()
image = sd.generate("A beautiful landscape")
image.save("landscape.png")
diffusers:
from diffusers import StableDiffusionPipeline
import torch
pipeline = StableDiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5")
pipeline = pipeline.to("cuda")
image = pipeline("A beautiful landscape").images[0]
image.save("landscape.png")
The Stable-Diffusion repository provides a more straightforward API for quick image generation, while diffusers offers more flexibility and control over the pipeline components. diffusers also supports hardware acceleration out of the box, as seen in the code example.
Invoke is a leading creative engine for Stable Diffusion models, empowering professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry leading WebUI, and serves as the foundation for multiple commercial products.
Pros of InvokeAI
- More comprehensive and feature-rich UI, including a web interface
- Better documentation and community support
- Regular updates and active development
Cons of InvokeAI
- Steeper learning curve due to more complex features
- Requires more system resources to run effectively
- May be overwhelming for beginners or those seeking a simpler interface
Code Comparison
InvokeAI:
from invokeai.app.services.image_generation import ImageGenerationService
generator = ImageGenerationService()
result = generator.generate(prompt="A beautiful sunset over the ocean")
Stable-Diffusion:
from stable_diffusion import StableDiffusion
sd = StableDiffusion()
image = sd.generate("A beautiful sunset over the ocean")
Both repositories provide implementations of Stable Diffusion, but InvokeAI offers a more comprehensive package with additional features and a robust UI. Stable-Diffusion, on the other hand, provides a simpler, more straightforward implementation that may be easier for beginners to understand and use. The code comparison shows that InvokeAI uses a service-based approach, while Stable-Diffusion offers a more direct method for image generation.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Expert-Level Tutorials on Stable Diffusion & SDXL: Master Advanced Techniques and Strategies
Greetings everyone. I am Dr. Furkan Gözükara. I am an Assistant Professor in Software Engineering department of a private university (have PhD in Computer Engineering).
My LinkedIn : https://www.linkedin.com/in/furkangozukara
My Twitter : https://twitter.com/GozukaraFurkan
My Linktr : https://linktr.ee/FurkanGozukara
My Mastodon : https://mastodon.social/@furkangozukara
Our channel address (37,000+ subscribers) if you like to subscribe ⤵ï¸
https://www.youtube.com/@SECourses
Our discord (8,000+ members) to get more help ⤵ï¸
https://discord.com/servers/software-engineering-courses-secourses-772774097734074388
Our 1,900+ Stars GitHub Stable Diffusion and other tutorials repo ⤵ï¸
https://github.com/FurkanGozukara/Stable-Diffusion
I am keeping this list up-to-date. I got upcoming new awesome video ideas. Trying to find time to do that.
I am open to any criticism you have. I am constantly trying to improve the quality of my tutorial guide videos. Please leave comments with both your suggestions and what you would like to see in future videos.
All videos have manually fixed subtitles and properly prepared video chapters. You can watch with these perfect subtitles or look for the chapters you are interested in.
Since my profession is teaching, I usually do not skip any of the important parts. Therefore, you may find my videos a little bit longer.
Playlist link on YouTube: ### Stable Diffusion Tutorials, Automatic1111 Web UI & Google Colab Guides, DreamBooth, Textual Inversion / Embedding, LoRA, AI Upscaling, Video to Anime
Tutorial Videos
1.) Automatic1111 Web UI - PC - Free
How To Install Python, Setup Virtual Environment VENV, Set Default Python System Path & Install Git
2.) Automatic1111 Web UI - PC - Free
Easiest Way to Install & Run Stable Diffusion Web UI on PC by Using Open Source Automatic Installer
3.) Automatic1111 Web UI - PC - Free
How to use Stable Diffusion V2.1 and Different Models in the Web UI - SD 1.5 vs 2.1 vs Anything V3
4.) Automatic1111 Web UI - PC - Free
Zero To Hero Stable Diffusion DreamBooth Tutorial By Using Automatic1111 Web UI - Ultra Detailed
5.) Automatic1111 Web UI - PC - Free
DreamBooth Got Buffed - 22 January Update - Much Better Success Train Stable Diffusion Models Web UI
6.) Automatic1111 Web UI - PC - Free
How to Inject Your Trained Subject e.g. Your Face Into Any Custom Stable Diffusion Model By Web UI
7.) Automatic1111 Web UI - PC - Free
How To Do Stable Diffusion LORA Training By Using Web UI On Different Models - Tested SD 1.5, SD 2.1
8.) Automatic1111 Web UI - PC - Free
8 GB LoRA Training - Fix CUDA & xformers For DreamBooth and Textual Inversion in Automatic1111 SD UI
9.) Automatic1111 Web UI - PC - Free
How To Do Stable Diffusion Textual Inversion (TI) / Text Embeddings By Automatic1111 Web UI Tutorial
10.) Automatic1111 Web UI - PC - Free
How To Generate Stunning Epic Text By Stable Diffusion AI - No Photoshop - For Free - Depth-To-Image
11.) Python Code - Hugging Face Diffusers Script - PC - Free
How to Run and Convert Stable Diffusion Diffusers (.bin Weights) & Dreambooth Models to CKPT File
12.) NMKD Stable Diffusion GUI - Open Source - PC - Free
Forget Photoshop - How To Transform Images With Text Prompts using InstructPix2Pix Model in NMKD GUI
13.) Google Colab Free - Cloud - No PC Is Required
Transform Your Selfie into a Stunning AI Avatar with Stable Diffusion - Better than Lensa for Free
14.) Google Colab Free - Cloud - No PC Is Required
Stable Diffusion Google Colab, Continue, Directory, Transfer, Clone, Custom Models, CKPT SafeTensors
15.) Automatic1111 Web UI - PC - Free
Become A Stable Diffusion Prompt Master By Using DAAM - Attention Heatmap For Each Used Token - Word
16.) Python Script - Gradio Based - ControlNet - PC - Free
Transform Your Sketches into Masterpieces with Stable Diffusion ControlNet AI - How To Use Tutorial
17.) Automatic1111 Web UI - PC - Free
Sketches into Epic Art with 1 Click: A Guide to Stable Diffusion ControlNet in Automatic1111 Web UI
18.) RunPod - Automatic1111 Web UI - Cloud - Paid - No PC Is Required
Ultimate RunPod Tutorial For Stable Diffusion - Automatic1111 - Data Transfers, Extensions, CivitAI
19.) RunPod - Automatic1111 Web UI - Cloud - Paid - No PC Is Required
How To Install DreamBooth & Automatic1111 On RunPod & Latest Libraries - 2x Speed Up - cudDNN - CUDA
20.) Automatic1111 Web UI - PC - Free
Fantastic New ControlNet OpenPose Editor Extension & Image Mixing - Stable Diffusion Web UI Tutorial
21.) Automatic1111 Web UI - PC - Free
Automatic1111 Stable Diffusion DreamBooth Guide: Optimal Classification Images Count Comparison Test
22.) Automatic1111 Web UI - PC - Free
Epic Web UI DreamBooth Update - New Best Settings - 10 Stable Diffusion Training Compared on RunPods
23.) Automatic1111 Web UI - PC - Free
New Style Transfer Extension, ControlNet of Automatic1111 Stable Diffusion T2I-Adapter Color Control
24.) Automatic1111 Web UI - PC - Free
Generate Text Arts & Fantastic Logos By Using ControlNet Stable Diffusion Web UI For Free Tutorial
25.) Automatic1111 Web UI - PC - Free
How To Install New DREAMBOOTH & Torch 2 On Automatic1111 Web UI PC For Epic Performance Gains Guide
26.) Automatic1111 Web UI - PC - Free
Training Midjourney Level Style And Yourself Into The SD 1.5 Model via DreamBooth Stable Diffusion
27.) Automatic1111 Web UI - PC - Free
Video To Anime - Generate An EPIC Animation From Your Phone Recording By Using Stable Diffusion AI
28.) Python Script - Jupyter Based - PC - Free
Midjourney Level NEW Open Source Kandinsky 2.1 Beats Stable Diffusion - Installation And Usage Guide
29.) Automatic1111 Web UI - PC - Free
RTX 3090 vs RTX 3060 Ultimate Showdown for Stable Diffusion, ML, AI & Video Rendering Performance
30.) Kohya Web UI - Automatic1111 Web UI - PC - Free
Generate Studio Quality Realistic Photos By Kohya LoRA Stable Diffusion Training - Full Tutorial
31.) Kaggle NoteBook (Cloud) - Free
DeepFloyd IF By Stability AI - Is It Stable Diffusion XL or Version 3? We Review and Show How To Use
32.) Python Script - Automatic1111 Web UI - PC - Free
How To Find Best Stable Diffusion Generated Images By Using DeepFace AI - DreamBooth / LoRA Training
33.) PC - Google Colab (Cloud) - Free
Mind-Blowing Deepfake Tutorial: Turn Anyone into Your Favorite Movie Star! PC & Google Colab - roop
34.) Automatic1111 Web UI - PC - Free
Stable Diffusion Now Has The Photoshop Generative Fill Feature With ControlNet Extension - Tutorial
35.) Automatic1111 Web UI - PC - Free
Human Cropping Script & 4K+ Resolution Class / Reg Images For Stable Diffusion DreamBooth / LoRA
36.) Automatic1111 Web UI - PC - Free
Stable Diffusion 2 NEW Image Post Processing Scripts And Best Class / Regularization Images Datasets
37.) Automatic1111 Web UI - PC - Free
How To Use Roop DeepFake On RunPod Step By Step Tutorial With Custom Made Auto Installer Script
38.) RunPod - Automatic1111 Web UI - Cloud - Paid - No PC Is Required
How To Install DreamBooth & Automatic1111 On RunPod & Latest Libraries - 2x Speed Up - cudDNN - CUDA
39.) Automatic1111 Web UI - PC - Free + RunPod (Cloud)
Zero to Hero ControlNet Tutorial: Stable Diffusion Web UI Extension | Complete Feature Guide
40.) Automatic1111 Web UI - PC - Free + RunPod (Cloud)
The END of Photography - Use AI to Make Your Own Studio Photos, FREE Via DreamBooth Training
41.) Google Colab - Gradio - Free - Cloud
How To Use Stable Diffusion XL (SDXL 0.9) On Google Colab For Free
42.) Local - PC - Free - Gradio
Stable Diffusion XL (SDXL) Locally On Your PC - 8GB VRAM - Easy Tutorial With Automatic Installer
43.) Cloud - RunPod
How To Use SDXL On RunPod Tutorial. Auto Installer & Refiner & Amazing Native Diffusers Based Gradio
44.) Local - PC - Free - Google Colab (Cloud) - RunPod (Cloud) - Custom Web UI
ComfyUI Master Tutorial - Stable Diffusion XL (SDXL) - Install On PC, Google Colab (Free) & RunPod
45.) Local - PC - Free - RunPod (Cloud)
First Ever SDXL Training With Kohya LoRA - Stable Diffusion XL Training Will Replace Older Models
46.) Local - PC - Free
How To Use SDXL in Automatic1111 Web UI - SD Web UI vs ComfyUI - Easy Local Install Tutorial / Guide
47.) Cloud - RunPod - Paid
How to use Stable Diffusion X-Large (SDXL) with Automatic1111 Web UI on RunPod - Easy Tutorial
48.) Local - PC - Free
Become A Master Of SDXL Training With Kohya SS LoRAs - Combine Power Of Automatic1111 & SDXL LoRAs
49.) Cloud - RunPod - Paid
How To Do SDXL LoRA Training On RunPod With Kohya SS GUI Trainer & Use LoRAs With Automatic1111 UI
50.) Cloud - Kaggle - Free
How to Do SDXL Training For FREE with Kohya LoRA - Kaggle - NO GPU Required - Pwns Google Colab
51.) Cloud - Kaggle - Free
How Use Stable Diffusion, SDXL, ControlNet, LoRAs For FREE Without A GPU On Kaggle Like Google Colab
52.) Windows - Free
Turn Videos Into Animation With Just 1 Click - ReRender A Video Tutorial - Installer For Windows
53.) RunPod - Cloud - Paid
Turn Videos Into Animation / 3D Just 1 Click - ReRender A Video Tutorial - Installer For RunPod
54.) Local - PC - Free
Double Your Stable Diffusion Inference Speed with RTX Acceleration TensorRT: A Comprehensive Guide
55.) RunPod - Cloud - Paid
How to Install & Run TensorRT on RunPod, Unix, Linux for 2x Faster Stable Diffusion Inference Speed
56.) Local - PC - Free
SOTA Image PreProcessing Scripts For Stable Diffusion Training - Auto Subject Crop & Face Focus
57.) Local - PC - Free
Fooocus Stable Diffusion Web UI - Use SDXL Like You Are Using Midjourney - Easy To Use High Quality
58.) Cloud - Kaggle (Cloud) - Free
How To Do Stable Diffusion XL (SDXL) DreamBooth Training For Free - Utilizing Kaggle - Easy Tutorial
59.) Free - Local - RunPod (Cloud)
PIXART-α : First Open Source Rival to Midjourney - Better Than Stable Diffusion SDXL - Full Tutorial
60.) Free - Local - PC
Essential AI Tools and Libraries: A Guide to Python, Git, C++ Compile Tools, FFmpeg, CUDA, PyTorch
61.) Free - Local - PC & RunPod (Cloud)
MagicAnimate: Temporally Consistent Human Image Animation using Diffusion Model - Full Tutorial
62.) Free - Local - PC - RunPod (Cloud) - Kaggle (Cloud)
Instantly Transfer Face By Using IP-Adapter-FaceID: Full Tutorial & GUI For Windows, RunPod & Kaggle
63.) Free - Local - PC - RunPod (Cloud) - Kaggle (Cloud)
Detailed Comparison of 160+ Best Stable Diffusion 1.5 Custom Models & 1 Click Script to Download All
64.) Free - Local - PC - RunPod (Cloud)
SUPIR: New SOTA Open Source Image Upscaler & Enhancer Model Better Than Magnific & Topaz AI Tutorial
65.) Free - Local - PC - Massed Compute (Cloud)
Full Stable Diffusion SD & XL Fine Tuning Tutorial With OneTrainer On Windows & Cloud - Zero To Hero
66.) Free - Local - PC - Cloud - Extension
Improve Stable Diffusion Prompt Following & Image Quality Significantly With Incantations Extension
67.) Free - Local - PC
Complete Guide to SUPIR Enhancing and Upscaling Images Like in Sci-Fi Movies on Your PC
68.) Free - Local - PC
IDM-VTON: The Most Amazing Virtual Clothing Try On Application - Open Source - 1 Click Install & Use
69.) Free & Paid - Cloud - RunPod - Massed Compute - Kaggle
IDM-VTON: The Most Amazing Virtual Clothing Try On Application - RunPod - Massed Compute - Kaggle
70.) Free - Local - PC
Stable Cascade Full Tutorial for Windows - Predecessor of SD3 - 1-Click Install Amazing Gradio APP
71.) Free & Paid - Cloud - RunPod - Massed Compute - Kaggle
Stable Cascade Full Tutorial for Cloud - Predecessor of SD3 - Massed Compute, RunPod & Kaggle
72.) Free All Platforms
How to Download (wget) Models from CivitAI & Hugging Face (HF) & upload into HF including privates
72.) Free All Platforms
How to Download (wget) Models from CivitAI & Hugging Face (HF) & upload into HF including privates
73.) Free All Platforms
Testing Stable Diffusion Inference Performance with Latest NVIDIA Driver including TensorRT ONNX
74.) Free - Local - PC
Mind-Blowing Deepfake Tutorial: Turn Anyone into Your Fav Movie Star! Better than Roop & Face Fusion
75.) Massed Compute (Cloud)
Best Deepfake Open Source App ROPE - So Easy To Use Full HD Feceswap DeepFace, No GPU Required Cloud
76.) Free - Local - PC
V-Express: 1-Click AI Avatar Talking Heads Video Animation Generator - D-ID Alike - Free Open Source
77.) Free & Paid - Cloud - RunPod - Massed Compute - Kaggle
V-Express 1-Click AI Talking Avatar Generator - Like D-ID - Massed Compute, RunPod & Kaggle Guide
78.) Free - Local - PC
Zero to Hero Stable Diffusion 3 Tutorial with Amazing SwarmUI SD Web UI that Utilizes ComfyUI
79.) Free & Paid - Cloud - RunPod - Massed Compute - Kaggle
How to Use SwarmUI & Stable Diffusion 3 on Cloud Services Kaggle (free), Massed Compute & RunPod
80.) Free - Local - PC
Animate Static Photos into Talking Videos with LivePortrait AI Compose Perfect Expressions Fast
81.) Free & Paid - Cloud - RunPod - Massed Compute - Kaggle
LivePortrait: No-GPU Cloud Tutorial - RunPod, MassedCompute & Free Kaggle Account - Animate Images
82.) Free & Paid - Cloud
Kling AI Video is FINALLY Public (All Countries), Free to Use and MIND BLOWING - Full Tutorial
83.) Free & Paid - Cloud - RunPod - Massed Compute - Kaggle
FLUX: The First Ever Open Source txt2img Model Truly Beats Midjourney & Others - FLUX is Awaited SD3
84.) Paid Cloud Service
SUPIR Online - Ultimate Image Upscaler by Official Developers - Full Tutorial - SUPIR 2 Incoming
85.) Free - Local - Windows
FLUX LoRA Training Simplified: From Zero to Hero with Kohya SS GUI (8GB GPU, Windows) Tutorial Guide
86.) Paid - Cloud - RunPod - Massed Compute
Blazing Fast & Ultra Cheap FLUX LoRA Training on Massed Compute & RunPod Tutorial - No GPU Required!
Top Related Projects
High-Resolution Image Synthesis with Latent Diffusion Models
Stable Diffusion web UI
🤗 Diffusers: State-of-the-art diffusion models for image and audio generation in PyTorch and FLAX.
Invoke is a leading creative engine for Stable Diffusion models, empowering professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry leading WebUI, and serves as the foundation for multiple commercial products.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot