Navigate:
All Reposstablediffusion
~$STABLE0.0%

Stable Diffusion: Latent text-to-image diffusion models

Text-to-image diffusion in compressed latent space.

LIVE RANKINGS • 06:52 AM • STEADY
OVERALL
#268
88
AI & ML
#86
11
30 DAY RANKING TREND
ovr#268
·AI#86
STARS
42.0K
FORKS
5.3K
DOWNLOADS
7D STARS
0
7D FORKS
0
Tags:
See Repo:
Share:

Learn more about stablediffusion

Stable Diffusion is a latent diffusion model that generates images from text prompts by operating in a compressed latent space rather than pixel space. The architecture uses a U-Net conditioned on text embeddings from CLIP or OpenCLIP encoders, with the diffusion process guided by text descriptions. Multiple model variants are available, including versions trained at 512x512 and 768x768 resolutions, with specialized fine-tuned versions for inpainting, upscaling, and depth-conditional synthesis. The models support both inference and fine-tuning workflows, with optional optimizations through libraries like xformers for GPU acceleration.

stablediffusion

1

Latent space operation

The model performs diffusion in a compressed latent representation rather than pixel space, reducing computational requirements while maintaining image quality. This architectural choice enables efficient generation on consumer hardware.

2

Multiple specialized variants

Beyond base text-to-image models, the repository includes fine-tuned variants for specific tasks such as image inpainting, x4 upscaling, depth-guided synthesis, and image variation through unCLIP conditioning on CLIP embeddings.

3

Flexible text encoder options

Different model versions use different text encoders, including OpenCLIP-ViT/H in version 2.0 and later, with support for both standard noise-prediction and v-prediction formulations for different training objectives.


from diffusers import StableDiffusionPipeline
import torch

pipe = StableDiffusionPipeline.from_pretrained(
    "runwayml/stable-diffusion-v1-5",
    torch_dtype=torch.float16
)
pipe = pipe.to("cuda")

image = pipe("a serene mountain landscape at sunset").images[0]
image.save("output.png")


[ EXPLORE MORE ]

Related Repositories

Discover similar tools and frameworks used by developers