What It Does
Instead of your agent reasoning through ComfyUI workflow every time (burning thousands of tokens), gen.py wraps the entire flow into one command. Pass a prompt, get an image. That's it. v1.1: Auto-detects ComfyUI — tries primary URL, falls back to FALLBACK_COMFY_URL. Fast defaults: 30 steps, euler.
Usage
python3 gen.py --prompt "1girl, blue hair, sunset"
Basic generation — auto-detects ComfyUI
python3 gen.py --prompt "..." --width 1024 --height 1024 --steps 30
Custom dimensions (fast: 30 steps, euler)
python3 gen.py --prompt "..." --model "dreamshaperXL" --output ./out/
Custom model and output path
COMFY_URL=http://10.0.0.14:8188 python3 gen.py --prompt "..."
Override ComfyUI URL via env var
COMFY_FALLBACK_URL=http://my-pc:8188 python3 gen.py --prompt "..."
Set fallback URL via env var
Example Output
✅ Image saved → ./output/gen_20260630_142301.png
Size: 1024x1024 | Steps: 25 | Model: default
Generated in 8.2s
Details
Ready to save tokens?
Purchase includes the full script, free updates, and email support.
$15
🔓 Buy & Download
See All Scripts
stdlib only — runs anywhere Python 3.8+ is installed. No exotic dependencies, no API keys required (unless the service itself needs one).