Example done for liutyi text2image test v2.20.gpt and liutyi text2image test v2.20.geminiΒ 

Script for SD.Next w/o scheduler

that use bash curl and API calls to SD.Next (local or remote). Example for local (127.0.0.1). Execute for currently loaded model .tested on SD.Next dev 2026-04-25

#!/usr/bin/env bash
 
API="http://127.0.0.1:7860/sdapi/v1/txt2img"
OUTDIR="gemini-20image-test"
mkdir -p "$OUTDIR"
 
# ---- GLOBAL SETTINGS (KEEP CONSTANT FOR FAIR COMPARISON) ----
STEPS=8
CFG=1
WIDTH=1024
HEIGHT=1024
SAMPLER="Default"
SEED=20260425   # set -1 for random
 
#MODEL='Diffusers/baidu/ERNIE-Image-Turbo [54f8a75695]'  # optionally pass model name
 
# ---- PROMPT LIST ----
prompts=(
"Portrait of an elderly woman, extreme close-up, wrinkled skin, sunlight, highly detailed skin texture."
"Street photography, a man in a red raincoat walking through neon-lit Tokyo rain, reflections on pavement, 35mm lens, cinematic lighting."
"A cinematic wide shot of a multi-generational family eating dinner in a rustic kitchen; steam rising from food, warm candlelight, shallow depth of field, authentic atmosphere."
"High-fashion editorial, model wearing a dress made entirely of liquid mercury, floating in a zero-gravity white marble room, sharp focus, futuristic aesthetic."
"Minimalist flat vector illustration of a mountain peak, blue and orange palette, clean lines, geometric shapes."
"1990s Japanese anime style, a girl looking out a train window at a futuristic cityscape, soft lo-fi aesthetic, hand-drawn look."
"An intricate oil painting in the style of Rembrandt: a robotic knight kneeling in a dark cathedral, a single beam of light hitting the rusted metal armor, dramatic chiaroscuro."
"A chaotic Risograph print of a jazz band, overlapping neon colors, grainy texture, abstract shapes, misaligned ink layers, retro print aesthetic."
"A glowing neon sign on a brick wall that says the word 'FUTURE', night time, realistic textures, vibrant light spill."
"A transparent glass cube sitting on a wooden table, inside the cube is a tiny thunderstorm with lightning and dark clouds, hyper-realistic."
"A double exposure photograph: the silhouette of a thinker's head merged with a sprawling, intricate clockwork mechanism and gears, conceptual art."
"A realistic cardboard box with 'TOP SECRET' written in bold marker, with a tiny galaxy spilling out of the opening, stars and nebulae, cinematic."
"Macro shot of a honeybee on a lavender flower, bokeh background, sharp focus on the bee's wings and eyes."
"An isometric 3D diorama of a lush tropical island with a tiny waterfall and a hidden cave, tilt-shift effect, stylized miniature world."
"A vast, surreal landscape where the clouds are made of colorful cotton candy and the ocean is a mirror reflecting a giant moon, dreamlike atmosphere."
"Extreme macro of a human eye, but the iris is a detailed map of the world, hyper-realistic, 8k resolution, intricate detail."
"Brutalist concrete building, overgrown with green vines, cloudy sky, architectural photography, moody lighting."
"Interior of a futuristic library with floating bookshelves and a giant holographic globe in the center, wide angle, soft ambient glow."
"A low-angle shot of a cyberpunk skyscraper shaped like a DNA helix, glowing blue lights, flying vehicles, rainy atmosphere, epic scale."
"Cross-section view of a subterranean city inside a giant asteroid, multiple levels of gardens, factories, and living quarters, detailed technical illustration."
)
 
# ---- OPTIONAL: SWITCH MODEL ----
if [ -n "$MODEL" ]; then
  echo "πŸ”„ Switching model to: $MODEL"
  curl -s -X POST http://127.0.0.1:7860/sdapi/v1/options \
    -H "Content-Type: application/json" \
    -d "{\"sd_model_checkpoint\": \"$MODEL\"}" > /dev/null
  sleep 2
fi
 
# ---- GENERATION LOOP ----
i=1
for prompt in "${prompts[@]}"; do
  printf "\n[%02d/20] Generating...\n" "$i"
 
  json=$(jq -n \
    --arg prompt "$prompt" \
    --arg sampler "$SAMPLER" \
    --argjson steps $STEPS \
    --argjson cfg $CFG \
    --argjson w $WIDTH \
    --argjson h $HEIGHT \
    --argjson seed $SEED \
    '{
      prompt: $prompt,
      steps: $steps,
      cfg_scale: $cfg,
      width: $w,
      height: $h,
      sampler_name: $sampler,
      seed: $seed,
      batch_size: 1,
      n_iter: 1
    }')
 
  response=$(curl -s "$API" \
    -H "Content-Type: application/json" \
    -d "$json")
 
  # Extract base64 image and save
  echo "$response" | jq -r '.images[0]' | base64 -d > \
          "$OUTDIR/$(date --iso)_$(printf "%02d" $i)_seed${SEED}.png"
 
  ((i++))
done
 
echo "βœ… Done. Images saved to $OUTDIR/"

execution output

oliutyi@server7:~$ ./gemini-test-220.sh

[01/20] Generating...

[02/20] Generating...

[03/20] Generating...

[04/20] Generating...

[05/20] Generating...

[06/20] Generating...

[07/20] Generating...

[08/20] Generating...

[09/20] Generating...

[10/20] Generating...

[11/20] Generating...

[12/20] Generating...

[13/20] Generating...

[14/20] Generating...

[15/20] Generating...

[16/20] Generating...

[17/20] Generating...

[18/20] Generating...

[19/20] Generating...

[20/20] Generating...
βœ… Done. Images saved to gemini-test220-results/
oliutyi@server7:~$ ./chatgpt-test-220.sh

[01/20] Generating...

[02/20] Generating...

[03/20] Generating...

[04/20] Generating...

[05/20] Generating...

[06/20] Generating...


Script for sdnext-scheduler API

#!/usr/bin/env bash
set -e

API="http://10.9.8.207:7860"
SCHED="$API/agent-scheduler/v1/queue/txt2img"
OPTIONS="$API/sdapi/v1/options"

# ---- GLOBAL SETTINGS (KEEP CONSTANT FOR FAIR COMPARISON) ----
STEPS=50
CFG=4
AG=4
WIDTH=1024
HEIGHT=1024
SAMPLER="Default"
SEED=20260425
MODEL="Diffusers/Qwen/Qwen-Image-2512 [25468b98e3]"

# ---- PROMPTS ----
prompts=(
"a red apple on a wooden table, soft natural lighting"
"a small cabin in the mountains, watercolor painting, pastel tones"
"portrait photo of a 35 year old man, neutral expression, studio lighting, 85mm lens"
"a cat sitting in the center of a window frame, symmetrical composition, morning light"
"a street scene at night illuminated only by neon blue and pink lights"

"three glass bottles, one filled with red liquid, one blue, one green, arranged in a row on a reflective surface"
"a chrome sphere and a matte black cube on a white surface, strong directional sunlight casting sharp shadows"
"cinematic photo of a woman walking in rain, wet asphalt reflections, shot on 50mm lens, shallow depth of field"
"a futuristic city skyline in the style of cyberpunk and art deco, highly detailed, dramatic lighting"
"extreme low angle view of a towering skyscraper disappearing into fog, wide angle lens distortion"

"a wooden chair placed on top of a table inside a small room, viewed from the doorway"
"a chef flipping a pancake in mid air in a busy kitchen, motion blur, dynamic composition"
"five birds sitting on a wire, each bird a different color and size"
"a storefront sign that clearly reads \"OPEN 24 HOURS\", realistic street photography"
"a candle lighting a dark room, objects gradually fading into shadow, realistic light falloff"

"two identical twins, one wearing black suit and one wearing white suit, standing side by side, neutral background"
"a cluttered desk with a laptop, a coffee mug, scattered papers, a glowing desk lamp, and a small plant near the edge"
"a glass of water on a mirror surface reflecting a sunset sky, realistic reflections and refractions"
"a hyper realistic photograph of a dragon sitting in a modern living room, natural lighting"
"a perfectly centered circle inside a square frame, minimalistic design, high contrast black and white"
)

# ---- QUEUE JOBS ----
i=1
for prompt in "${prompts[@]}"; do
  printf "[QUEUE %02d] %s\n" "$i" "$prompt"
  json=$(jq -n \
    --arg prompt "$prompt" \
    --arg sampler "$SAMPLER" \
    --argjson steps $STEPS \
    --arg checkpoint "$MODEL" \
    --argjson cfg $CFG \
    --argjson ag $AG \
    --argjson w $WIDTH \
    --argjson h $HEIGHT \
    --argjson seed $SEED \
    '{
        sd_model_checkpoint: $checkpoint,
        prompt: $prompt,
        steps: $steps,
        cfg_scale: $cfg,
        pag_scale: $ag,
        width: $w,
        height: $h,
        sampler_name: $sampler,
        seed: $seed,
        batch_size: 1,
        n_iter: 1,
        save_images: true
    }')


  TASK_NAME="$(printf '%02d' $i) ${prompt:0:16}"
  ENCODED=$(python3 -c "import urllib.parse,sys; print(urllib.parse.quote(sys.argv[1]))" "$TASK_NAME")

  curl -s -X POST "$SCHED?name=$ENCODED" \
    -H "Content-Type: application/json" \
    -d "$json" > /dev/null


  ((i++))
done

echo "βœ… All jobs queued in scheduler"

execution

oliutyi@server7:~$ ./schedule-test-220-gemini.sh
[QUEUE 01] Portrait of an elderly woman, extreme close-up, wrinkled skin, sunlight, highly detailed skin texture.
[QUEUE 02] Street photography, a man in a red raincoat walking through neon-lit Tokyo rain, reflections on pavement, 35mm lens, cinematic lighting.
[QUEUE 03] A cinematic wide shot of a multi-generational family eating dinner in a rustic kitchen; steam rising from food, warm candlelight, shallow depth of field, authentic atmosphere.
[QUEUE 04] High-fashion editorial, model wearing a dress made entirely of liquid mercury, floating in a zero-gravity white marble room, sharp focus, futuristic aesthetic.
[QUEUE 05] Minimalist flat vector illustration of a mountain peak, blue and orange palette, clean lines, geometric shapes.
[QUEUE 06] 1990s Japanese anime style, a girl looking out a train window at a futuristic cityscape, soft lo-fi aesthetic, hand-drawn look.
[QUEUE 07] An intricate oil painting in the style of Rembrandt: a robotic knight kneeling in a dark cathedral, a single beam of light hitting the rusted metal armor, dramatic chiaroscuro.
[QUEUE 08] A chaotic Risograph print of a jazz band, overlapping neon colors, grainy texture, abstract shapes, misaligned ink layers, retro print aesthetic.
[QUEUE 09] A glowing neon sign on a brick wall that says the word 'FUTURE', night time, realistic textures, vibrant light spill.
[QUEUE 10] A transparent glass cube sitting on a wooden table, inside the cube is a tiny thunderstorm with lightning and dark clouds, hyper-realistic.
[QUEUE 11] A double exposure photograph: the silhouette of a thinker's head merged with a sprawling, intricate clockwork mechanism and gears, conceptual art.
[QUEUE 12] A realistic cardboard box with 'TOP SECRET' written in bold marker, with a tiny galaxy spilling out of the opening, stars and nebulae, cinematic.
[QUEUE 13] Macro shot of a honeybee on a lavender flower, bokeh background, sharp focus on the bee's wings and eyes.
[QUEUE 14] An isometric 3D diorama of a lush tropical island with a tiny waterfall and a hidden cave, tilt-shift effect, stylized miniature world.
[QUEUE 15] A vast, surreal landscape where the clouds are made of colorful cotton candy and the ocean is a mirror reflecting a giant moon, dreamlike atmosphere.
[QUEUE 16] Extreme macro of a human eye, but the iris is a detailed map of the world, hyper-realistic, 8k resolution, intricate detail.
[QUEUE 17] Brutalist concrete building, overgrown with green vines, cloudy sky, architectural photography, moody lighting.
[QUEUE 18] Interior of a futuristic library with floating bookshelves and a giant holographic globe in the center, wide angle, soft ambient glow.
[QUEUE 19] A low-angle shot of a cyberpunk skyscraper shaped like a DNA helix, glowing blue lights, flying vehicles, rainy atmosphere, epic scale.
[QUEUE 20] Cross-section view of a subterranean city inside a giant asteroid, multiple levels of gardens, factories, and living quarters, detailed technical illustration.
βœ… All jobs queued in scheduler


  • No labels