CoolFace
Modelpublic

PNW-GM/z-image-witcher3-velen-lora

sourceHugging Faceapache-2.0updated 4mo agoView on Hugging Face
0likes9downloads
Model Card

z-image-witcher3-velen-lora

LoRA adapter for Tongyi-MAI/Z-Image trained on aerial cartographic terrain captures from The Witcher 3: Wild Hunt's Velen region. The adapter biases the base model toward stylized top-down map renders: Velen's muted earth palette, dense conifer forests, river networks, marsh textures, and flat-shaded hills.

Training config

  • —Run 2: attention + FFN LoRA, rank 128, 720 steps at effective batch 16 (bs=8/rank x 2 A40s)
  • —Target modules: to_q, to_k, to_v, to_out.0, feed_forward.w1/w2/w3
  • —Dataset: 2544 rows, full coverage, ~4.5 epoch-equivalents
  • —Loss: converged to ~0.29 (down from 0.49 at step 1)
  • —Inference: native ZImagePipeline, 50 steps, guidance_scale=5.0

Flow-matching convention (important if you re-train from this)

Training timestep is normalized as t = (1000 - sched.timesteps[idx]) / 1000 matching HF Diffusers' examples/dreambooth/train_dreambooth_lora_z_image.py. The flow-matching target is equivalent to noise - model_input, with the Z-Image pipeline pre-step negation handled by model_pred = -model_pred.

Dataset

`PNW-GM/witcher3_velen`

Usage

python
import torch
from diffusers import ZImagePipeline

pipe = ZImagePipeline.from_pretrained(
    "Tongyi-MAI/Z-Image", torch_dtype=torch.bfloat16
).to("cuda")
pipe.load_lora_weights("PNW-GM/z-image-witcher3-velen-lora")

image = pipe(
    prompt="aerial cartographic view of a marshland village in the Velen style",
    num_inference_steps=50,
    guidance_scale=5.0,
).images[0]
image.save("velen.png")

What it produces

Top-down, slightly oblique aerial views with the Velen palette: ochre and olive ground, dense pine canopies, winding rivers, reedy swamps, and scattered ruined settlements. Best on terrain prompts rather than characters or close-ups.