File size: 618 Bytes
dbba600 5c990a1 dbba600 5c990a1 dbba600 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import torch
from torch import autocast
from diffusers import DiffusionPipeline
pipe = DiffusionPipeline.from_pretrained("uf/braBeautifulRealistic_brav5",torch_dtype=torch.float16)
prompt = "an asian woman with long hair and a black top is posing for a picture with her hand on her chin, 1girl, solo, long_hair, looking_at_viewer, brown_hair, simple_background, black_hair, jewelry, earrings, necklace, lips, black_shirt, ring, realistic"
with autocast("cuda"):
image = pipe(prompt).images[0]
#图片保存
image.save(f"astronaut_rides_horse.png")
#或者你可以直接在这个notebook里显示查看.
image |