Views
No views yet
Tongyi-MAI/Z-Image (6B Single-Stream DiT, base / non-Turbo) that produces top-down fantasy RPG game-map tiles in the visual style of The Witcher 3: Wild Hunt's Velen region — muted greens and browns, rivers and marshland, forest, villages, ruins.PNW-GM/witcher3_velen (private), a captioned tile dataset cut from the in-game Velen world map.| File | Purpose |
|---|---|
adapter_model.safetensors | LoRA weights (rank 128). |
adapter_config.json | PEFT config — target_modules, rank, alpha. |
README.md | This card. |
| Base model | Tongyi-MAI/Z-Image (6B base, not the Turbo distilled variant — Turbo is explicitly marked non-fine-tunable on its model card) |
| LoRA rank / alpha | 128 / 128 |
| Target modules | to_q, to_k, to_v, to_out.0, feed_forward.w1, feed_forward.w2, feed_forward.w3 (attention + SwiGLU FFN) |
| Resolution | 1024² |
| Optimizer | AdamW, lr=1e-4, bf16 mixed precision, gradient checkpointing |
| Effective batch | 16 (bs=8/rank × 2 ranks DDP, no grad accumulation) |
| Steps | 720 (≈1.13 epoch over ~10 176 rows after 4× repetitions) |
| Hardware | 2× NVIDIA A40 (48 GB), ~5 h wall-time |
feed_forward.w1 = gate, w2 = down, w3 = up) — not the ff.net.0.proj / ff.net.2 pattern from generic diffusers examples. Verified by inspecting transformer.layers[0].feed_forward.named_modules().diffusers @ main (the version that exposes ZImagePipeline), peft >= 0.13, and safetensors.1import torch
2from diffusers import ZImagePipeline
3from peft import PeftModel
4
5BASE = "Tongyi-MAI/Z-Image"
6LORA = "PNW-GM/witcher3-velen-z-image-lora"
7
8pipe = ZImagePipeline.from_pretrained(BASE, torch_dtype=torch.bfloat16)
9pipe.to("cuda")
10pipe.transformer = PeftModel.from_pretrained(pipe.transformer, LORA)
11pipe.transformer.eval()
12
13prompt = (
14 "This fragment of a fantasy RPG game map depicts a small, elongated river "
15 "running centrally from the bottom left to the top right of the frame. The "
16 "river's waters are depicted in greenish-blue with wavy textures. Surrounding "
17 "the river, there are patches of forest in darker brown shades, interspersed "
18 "with lighter clearings. To the left side of the river, several irregularly "
19 "shaped small ponds are surrounded by dense vegetation. A narrow dirt path "
20 "winds along the right bank, connecting two clusters of wooden buildings."
21)
22
23image = pipe(
24 prompt=prompt,
25 height=1024,
26 width=1024,
27 num_inference_steps=50,
28 guidance_scale=5.0,
29 generator=torch.Generator("cuda").manual_seed(441),
30).images[0]
31image.save("velen_z.png")num_inference_steps=50 + guidance_scale=5.0 matches Z-Image base defaults and the training distribution. The Turbo variant (8 steps, CFG=0) can be tried as a base, but its model card explicitly says it is not fine-tunable — the LoRA may be partially or wholly ignored by the distilled schedule.@misc{pnwgm_witcher3_velen_z_image_lora,
title = {Witcher 3 Velen Z-Image LoRA},
author = {PNW-GM},
year = {2026},
url = {https://huggingface.co/PNW-GM/witcher3-velen-z-image-lora},
}