Views
No views yet
"a pixel art character ..."
Tongyi-MAI/Z-Image-Turbo1import torch
2from diffusers import DiffusionPipeline
3from peft import PeftModel
4
5pipe = DiffusionPipeline.from_pretrained(
6 "Tongyi-MAI/Z-Image-Turbo",
7 dtype=torch.bfloat16,
8 device_map="cuda"
9)
10
11pipe.load_lora_weights("SkyAsl/Pixel-artist-Z")
12pipe.fuse_lora(lora_scale=0.85)
13
14prompt = "a pixel art character with square orange glasses, a chef hat-shaped head and a purple-colored body on a cool background"
15
16image = pipe(
17 prompt=prompt,
18 num_inference_steps=4,
19 guidance_scale=0.0
20).images[0]
21
22image.save("pixel_art.png")| Model | Normalized CLIPScore (mean ± std) |
|---|---|
| Z-Image-Turbo | 7.834 ± 2.577 |
| Pixel-artist-Z | 8.856 ± 2.473 |
lr=1e-4)

1r = 16
2lora_alpha = 32
3lora_dropout = 0.05
4target_modules = [to_q, to_k, to_v, to_out.0]1a pixel art character with a wizard hat and glowing blue eyes
2a pixel art character holding a sword and wearing red armor
3a pixel art character with a robot body and green visor