Views
No views yet

1import torch
2from diffusers import ZImagePipeline
3
4# Load the pipeline
5pipe = ZImagePipeline.from_pretrained(
6 "alfredplpl/z-image-modern-anime",
7 torch_dtype=torch.bfloat16,
8 low_cpu_mem_usage=False,
9)
10pipe.to("cuda")
11
12# Generate image
13prompt = "Japanese modern anime style, an upper body shot of an woman standing on the rainy street. She watches the sky. "
14negative_prompt = "photo, cg, 3d, blurry"
15
16image = pipe(
17 prompt=prompt,
18 negative_prompt=negative_prompt,
19 height=1280,
20 width=720,
21 cfg_normalization=False,
22 num_inference_steps=30,
23 guidance_scale=4,
24 generator=torch.Generator("cuda").manual_seed(42),
25).images[0]
26
27image.save("example.png")