#!/usr/bin/env bash # Cinematic batch — people doing things, specific dress, photoreal/cinematic style. # Usage: cinematic_batch.sh set -euo pipefail LAB="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" PY="$LAB/.venv/bin/python" QUANT="${1:-q6}" WIDTH="${2:-1920}" HEIGHT="${3:-1088}" MODEL="$LAB/mlx_models/hidream-o1-dev-${QUANT}" OUT="$LAB/sample_outputs/cinematic_${QUANT}_${WIDTH}x${HEIGHT}" mkdir -p "$OUT" echo "cinematic batch: quant=${QUANT}, ${WIDTH}x${HEIGHT}, model=${MODEL}, out=${OUT}" run() { local name="$1" prompt="$2" seed="${3:-42}" echo "=== $name (seed=$seed) ===" cd "$LAB" && /usr/bin/time -l "$PY" scripts/hidream_o1/generate_hidream_o1_mlx.py \ --model-path "$MODEL" \ --prompt "$prompt" \ --width "$WIDTH" --height "$HEIGHT" \ --output "$OUT/$name.png" \ --seed "$seed" 2>&1 | grep -E "loaded|using|generation:|saved|maximum resident" | tail -5 echo "" } run "01_jazz_pianist" \ "cinematic medium shot of a jazz pianist in his fifties at a baby grand piano, wearing a navy three-piece suit with a thin gold pocket watch chain, fingers blurred mid-arpeggio, dim smoky club lighting from above, deep shadows, anamorphic 35mm film grain, shallow depth of field" \ 3 run "02_street_photographer" \ "cinematic shot of a young street photographer crouched on a Shinjuku crosswalk at night, holding a Leica M11 camera up to her eye, wearing an olive-green oversized trench coat over black jeans and black leather boots, neon signs in Japanese reflecting off wet asphalt, wide-angle lens, blade runner color palette, photorealistic" \ 17 run "03_michelin_chef" \ "close-up cinematic shot of a Michelin-star chef in a crisp white double-breasted chef coat with rolled sleeves, tweezers placing a single edible flower onto a black slate plate, steam rising, kitchen brigade in soft focus behind, warm copper-pan lighting, food cinematography, hyperreal" \ 29 run "04_ballet_dancer" \ "cinematic full-body shot of a ballerina mid-grand-jeté across an empty rehearsal studio, wearing a slate-grey leotard and pink satin pointe shoes, hair in a tight bun, golden afternoon sunlight streaming through tall windows, dust particles visible in the light beams, motion blur on her trailing foot" \ 41 run "05_astronaut" \ "cinematic wide shot of an astronaut in a battered orange ACES launch-and-entry suit walking down a long curved corridor inside a space station, helmet tucked under one arm, clipboard in the other, fluorescent overhead strip lighting, scratched white wall panels, anamorphic lens flare, sci-fi realism" \ 53 echo "=== batch complete ===" ls -la "$OUT"