Create an app.py file with the content:
import torch
from diffusers import StableDiffusionPipeline
model_id = "runwayml/stable-diffusion-v1-5"
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float32)
def infer(Prompt):
image = pipe(Prompt).images[0]
return image
prompt = "a photo of a cat climbing a tree trying to catch a butterfly"
image = infer(prompt)
image.save("name.png")
And run it
Content type
Image
Digest
sha256:eb4254119…
Size
8.8 GB
Last updated
over 3 years ago
docker pull pineedaa/stable-diffusion