pip install --upgrade git+https://github.com/huggingface/diffusers.git transformers accelerate scipy import torch from diffusers import StableDiffusionPipeline, EulerDiscreteScheduler torch.manual_seed(1000) model_id = "stabilityai/stable-diffusion-2" # Use the Euler scheduler here instead scheduler = EulerDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler") pipe = StableDiffusionPipeline.from_pretrained(model_id, scheduler=scheduler, revision="fp16", torch_dtype=torch.float16) pipe = pipe.to("cuda") prompt = input() image = pipe(prompt).images[0] image.save("./image.png") from IPython.display import Image Image("./image.png")