#!/usr/bin/env python3
"""Z-Image Turbo model sheets for the new 'The Last Print' cast + drawer prop.
Writes job files for 3 seeds each; run one at a time with run_job.py <job> 8484.
"""
import json, pathlib
OUT = pathlib.Path(__file__).parent / "prompts" / "zimage"; OUT.mkdir(parents=True, exist_ok=True)
R = "/Users/sarthakrawool/omni-test/2026-12-07-the-wedding-photo"

# The defect fix: explicit rounded/Pixar face geometry, no square or share-shaped heads.
STYLE = (
    "3D animated feature film character design, Pixar-style clean smooth render, "
    "stylised cartoon grown-up on realistic adult body proportions, about seven heads tall, long adult legs, clearly an adult and never a child, "
    "a soft rounded oval head and face with full rounded cheeks and a softly rounded jawline, absolutely no square head, no blocky head, no angular face, "
    "big round wide-open eyes with lots of white, soft thin eyebrows, a slightly long nose with a rounded tip, a small soft mouth, "
    "minimal texture on clothes and hair, soft studio lighting"
)
SHEET4 = (
    "A four-panel character model sheet in one single image, plain light grey background, four tall panels side by side separated by thin white lines. "
    "Left panel: a tight close-up portrait of the character's face and hair, filling the panel. "
    "Second panel: front view of the outfit from the shoulders down to the shoes, the top edge of the panel cuts through the neck so no face is in this panel. "
    "Third panel: back view, the character stands facing away from the viewer, showing the back of the hair, the back of the head and the back of the clothes, no face visible. "
    "Fourth panel: side view of the outfit from the shoulders down to the shoes, the top edge of the panel cuts through the neck so no face is in this panel. "
    "The character: "
)
CAST = {
    "mara": (
        "a mature adult woman in her forties with an adult woman's face: a soft rounded oval face, warm dark-brown skin, close-cropped natural curls dyed copper at the tips, "
        "expressive warm brown eyes, an oversized cobalt-blue work jacket with a single fluorescent-orange rabbit patch on the left shoulder, a plain cream T-shirt, "
        "gold hoop earrings, dark trousers, white sneakers, tall adult figure"
    ),
    "tomek": (
        "an elderly 78-year-old grandmother with a soft rounded face, deep laugh lines, warm light-brown skin, silver hair in a tight bun, thick square glasses, "
        "kind eyes, a faded cherry-red knit cardigan over a plain grey dress, a thin blue yarn strand around her wrist, two thin gold rings, "
        "small upright elderly adult figure"
    ),
    "dex": (
        "a young adult man in his early thirties with a soft rounded oval face, lanky tall adult figure, light-brown skin, a short buzz cut, a small gold stud earring, "
        "a permanent crooked half-smile, a fluorescent yellow apron with plain smooth front over a plain black T-shirt, green rubber gloves clipped at his belt, "
        "dark jeans, white sneakers"
    ),
    "june": (
        "a young adult woman in her mid twenties with a soft rounded oval face, warm tan skin, a short choppy black bob with one shaved side, a chunky silver nose ring, "
        "bright alert eyes, a lilac scrub top, a plain denim jacket tied at her waist, dark scrub trousers, "
        "always holding a plain travel mug with a smooth blank surface, average adult figure"
    ),
}
PROP = {
    "drawer": (
        "A battered metal filing drawer seen straight on, filling the frame: worn pale-grey painted metal, a hand-painted orange rabbit silhouette on the side panel, "
        "a small stack of old photo prints inside the top drawer, scuffed edges and a dented handle. "
        "Stylised 3D animated feature film prop, clean smooth render, no writing anywhere."
    ),
}
jobs = []
for k, d in CAST.items():
    jobs.append((f"sheet4_{k}", SHEET4 + d + ". " + STYLE, 2048, 1024))
for k, d in PROP.items():
    jobs.append((f"prop_{k}", d + " " + STYLE, 896, 1152))
for name, prompt, w, h in jobs:
    for seed in (101, 103, 104):
        req = {"model": "z-image-turbo-8bit", "prompt": prompt, "width": w, "height": h, "seed": seed,
               "params": {"steps": 9}, "output": f"{R}/zimage/{name}_s{seed}.png"}
        (OUT / f"{name}_s{seed}.json").write_text(json.dumps(req, indent=1))
print(len(jobs) * 3, "jobs ->", OUT)
