File size: 2,796 Bytes
ffe929e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env bash
# Showcase battery: diverse prompts to characterise HiDream-O1-Image-Dev Q8.
# Sequential. Each generates a single 1024x1024 PNG.
set -euo pipefail

LAB="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
PY="$LAB/.venv/bin/python"
# Quant comes from $1 (default q6 — sweet spot). Pass q8 to use Q8 for safety-margin runs.
QUANT="${1:-q6}"
MODEL="$LAB/mlx_models/hidream-o1-dev-${QUANT}"
OUT="$LAB/sample_outputs/showcase_${QUANT}"
mkdir -p "$OUT"
echo "showcase quant=${QUANT}, 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 1024 --height 1024 \
    --output "$OUT/$name.png" \
    --seed "$seed" 2>&1 | grep -E "loaded|using|generation:|saved|maximum resident" | tail -6
  echo ""
}

run "01_portrait_photo"      "studio photo of an elderly Japanese tea master with a wise smile, holding a ceramic teacup, gentle natural light, shallow depth of field, sharp focus on eyes, 85mm lens" 8
run "02_anime"               "anime girl with pink hair sitting on the rooftop of a Tokyo skyscraper at dusk, neon city lights below, cherry blossom petals floating, soft watercolor style" 19
run "03_macro_nature"        "extreme macro photo of a single dewdrop on a spiderweb at dawn, tiny rainbow refractions, blurred leaf background, ultra sharp focus" 31
run "04_architecture"        "interior of a futuristic library, towering bookshelves, holographic displays, warm golden light streaming through stained glass windows, wide angle" 5
run "05_surreal"             "a giant blue whale floating in the clouds above a vast desert landscape, magical realism, oil painting style, golden hour" 27
run "06_food_flatlay"        "overhead flat lay of a rustic italian breakfast, golden croissants, espresso cup, fresh berries, marble surface, soft morning light, food photography" 53
run "07_action_cinematic"    "samurai warrior mid leap with katana drawn, cherry blossoms swirling around him, mountain backdrop at sunset, dynamic action, cinematic film still" 71
run "08_fantasy_creature"    "majestic dragon perched on a crystal mountain peak, iridescent scales reflecting aurora borealis, snow swirling around, dramatic dramatic lighting, fantasy art" 88
run "09_wildlife"            "close-up portrait of a snow leopard staring directly at the camera, falling snow flakes, mountain background, national geographic style, ultra sharp" 17
run "10_text_render"         "vintage diner neon sign reading BLOOM CAFE in glowing pink letters at night, retro americana 1950s style, rainy street reflection, cinematic" 64

echo "=== showcase complete ==="
ls -la "$OUT"