Diffusers-4.py
· 254 B · Python
Ham
from diffusers import DiffusionPipeline
import torch
pipeline = DiffusionPipeline.from_pretrained("stable-diffusion-v1-5/stable-diffusion-v1-5", torch_dtype=torch.float16)
pipeline.to("cuda")
pipeline("An image of a squirrel in Picasso style").images[0]
1 | from diffusers import DiffusionPipeline |
2 | import torch |
3 | |
4 | pipeline = DiffusionPipeline.from_pretrained("stable-diffusion-v1-5/stable-diffusion-v1-5", torch_dtype=torch.float16) |
5 | pipeline.to("cuda") |
6 | pipeline("An image of a squirrel in Picasso style").images[0] |