π¦ ClawHub
DrawThings Image Generation
by @dustinparsons
Generate images with DrawThings (Stable Diffusion) via API. Use when creating images from text prompts, running image generation workflows, or batch generating images. DrawThings runs locally on Mac with MLX/CoreML acceleration.
β‘ When to Use
π‘ Examples
Generate a single image:
python3 scripts/generate.py "a cyberpunk cat in neon city"
With custom settings:
python3 scripts/generate.py "a cyberpunk cat" \
--steps 20 \
--cfg-scale 7.5 \
--width 768 \
--height 768 \
--sampler "DPM++ 2M Karras"
Batch generation (5 variations):
python3 scripts/generate.py "a fantasy landscape" --batch-size 5
Save to specific location:
python3 scripts/generate.py "portrait photo" --output ./outputs/portrait.png
βοΈ Configuration
Set the DRAWTHINGS_URL environment variable (defaults to http://127.0.0.1:7860):
export DRAWTHINGS_URL="http://127.0.0.1:7860"
Or configure in OpenClaw:
openclaw config set env.DRAWTHINGS_URL "http://127.0.0.1:7860"
π Tips & Best Practices
--batch-size for variations, not multiple script callsTERMINAL
clawhub install drawthings