question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Stable Diffusion 2

See original GitHub issue

Model/Pipeline/Scheduler description

Perhaps you already have something in the works for this, but I couldn’t see an existing issue for this.

Stable Diffusion 2 just got released on a separate repo. There are a few variations including the base, depth2img, and inpainting models. Though useable in the stable diffusion repo now, it would be really awesome to have support in diffusers to allow for ease of us in other applications!

Open source status

  • The model implementation is available
  • The model weights are available (Only relevant if addition is not a scheduler).

Provide useful links for the implementation

Model code and inference scripts can be found here

Model weights seem already available on 🤗 Hub at stabilityai/stable-diffusion-2-***

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Reactions:7
  • Comments:14 (12 by maintainers)

github_iconTop GitHub Comments

6reactions
vvvm23commented, Nov 24, 2022

From @pcuenca on the HF discord:

We are busy preparing a new release of diffusers to fully support Stable Diffusion 2. We are still ironing things out, but the basics already work from the main branch in github. Here’s how to do it:

  • Install diffusers from github alongside its dependencies:
pip install --upgrade git+https://github.com/huggingface/diffusers.git transformers accelerate scipy
  • Use the code in this script to run your predictions:
from diffusers import DiffusionPipeline, EulerDiscreteScheduler
import torch

repo_id = "stabilityai/stable-diffusion-2"
device = "cuda"

scheduler = EulerDiscreteScheduler.from_pretrained(repo_id, subfolder="scheduler", prediction_type="v_prediction")
pipe = DiffusionPipeline.from_pretrained(repo_id, torch_dtype=torch.float16, revision="fp16", scheduler=scheduler)
pipe = pipe.to(device)

prompt = "High quality photo of an astronaut riding a horse in space"
image = pipe(prompt, width=768, height=768, guidance_scale=9).images[0]
image.save("astronaut.png")
3reactions
Marcophono2commented, Nov 25, 2022

And available in 0.9.0! Damn fast job, guys!

Read more comments on GitHub >

github_iconTop Results From Across the Web

stabilityai/stable-diffusion-2 - Hugging Face
Training Procedure Stable Diffusion v2 is a latent diffusion model which combines an autoencoder with a diffusion model that is trained in the...
Read more >
Stable Diffusion 2.0 Release - Stability AI
The Stable Diffusion 2.0 release includes robust text-to-image models trained using a brand new text encoder (OpenCLIP), developed by LAION with ...
Read more >
Stable Diffusion 2 - Baseten
Stable Diffusion 2.0 is an open-source image generation model developed by Stability AI. The newest text-to-image model, Stable Diffusion 2.0 uses a brand ......
Read more >
Stable Diffusion Version 2 - GitHub
Stable Diffusion 2 is a latent diffusion model conditioned on the penultimate text embeddings of a CLIP ViT-H/14 text encoder. We provide a ......
Read more >
SECRET FREE Stable Diffusion 2.1 TRICK! As ... - YouTube
When the Stable Diffusion 2.0 & 2.1 models came out, ... your images generated with the 2.x models, and indeed the results are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found