Programmation-informatique's picture
Update app.py
fe3676f
raw
history blame
350 Bytes
from diffusers import DiffusionPipeline
model_id = "runwayml/stable-diffusion-v1-5"
pipeline = DiffusionPipeline.from_pretrained(model_id)
prompt = "portrait photo of a old warrior chief"
pipeline = pipeline.to("cuda")
import torch
generator = torch.Generator("cuda").manual_seed(0)
image = pipeline(prompt, generator=generator).images[0]
image