Generate, render, or create images using Draw Things — a Mac-based Stable Diffusion compatible AI image renderer — via its gRPC API. Use this skill when asked to generate images, create artwork, render a scene, produce an image, do text-to-image, img2img, image-to-image, or when the user wants to use DrawThings, Draw Things, or stable diffusion locally. Also use to list available models, LoRAs, or ControlNets on the Draw Things server.
Generates images via the Draw Things gRPC API running locally on macOS. Supports text-to-image, image-to-image, and server introspection.
Draw Things must be running on macOS with the gRPC server enabled (default port 7859).
Enable it in Draw Things → Settings → API Server.
Before running any skill script, the agent must check and prepare the environment. All setup scripts run with the system Python and have no dependencies on the drawthings package.
./.venv/bin/python src/drawthings/check_env.py --host localhost:7859
Returns JSON with ready: true/false, a object, list, and path.
If is , skip to running scripts. Use the value from the response to invoke skill scripts.
checksmissingvenv_pythonreadytruevenv_python./.venv/bin/python src/drawthings/setup_env.py
Creates the .venv, installs all dependencies via uv sync, and verifies the package is importable.
Returns JSON with success: true/false and the venv_python path.
This is idempotent — safe to run repeatedly.
Use the venv_python path from check/setup (typically .venv/bin/python) to run scripts:
./.venv/bin/python src/drawthings/generate.py --prompt "..."
./.venv/bin/python src/drawthings/list_models.py
./.venv/bin/python src/drawthings/img2img.py --input /path/to/image.png --prompt "..."
| Script | Purpose |
|---|---|
| src/drawthings/check_env.py | Validate environment (zero-dependency) |
| src/drawthings/setup_env.py | Create venv and install deps (zero-dependency) |
| src/drawthings/generate.py | Text-to-image generation |
| src/drawthings/img2img.py | Image-to-image (modify an existing image) |
| src/drawthings/list_models.py | List available models, LoRAs, ControlNets |
All scripts output JSON to stdout. Errors are written to stderr with a non-zero exit code.
python src/drawthings/list_models.py --host localhost:7859
Output JSON:
{
"models": ["flux_qwen_srpo_v1.0_f16.ckpt", "sd_v1.5_f16.ckpt"],
"loras": ["my_style.safetensors"],
"control_nets": ["controlnet_depth_1.x_v1.1_f16.ckpt"],
"upscalers": ["realesrgan_x2plus_f16.ckpt"],
"textual_inversions": []
}
list_models.py to find an available model namegenerate.py with the prompt and modeloutput./.venv/bin/python src/drawthings/generate.py \
--prompt "a golden retriever on a beach at sunset" \
--model "flux_qwen_srpo_v1.0_f16.ckpt" \
--width 512 --height 512 \
--output /tmp/result.png
All flags for generate.py:
| Flag | Default | Description |
|---|---|---|
--prompt | (required) | Positive prompt text |
--negative | "" | Negative prompt text |
--model | z_image_1.0_q8p.ckpt | Model filename (e.g. z_image_1.0_q8p.ckpt) |
--width | 1024 | Image width in pixels (rounded to nearest 64) |
--height | 1024 | Image height in pixels (rounded to nearest 64) |
--steps | 8 | Steps |
--guidance | server default | CFG guidance scale (e.g. 7.5) |
--seed | -1 | Seed for reproducibility |
--output | /tmp/output.png | Output file path (must end in .png or .jpg) |
--host | localhost:7859 | Draw Things gRPC server address |
Output JSON:
{ "success": true, "output": "/absolute/path/to/output.png" }
./.venv/bin/python src/drawthings/img2img.py \
--input /path/to/source.png \
--model z_image_1.0_q8p.ckpt \
--guidance 1.5 \
--width 1024 \
--height 1024 \
--prompt "same scene but in winter with snow" \
--strength 0.6 \
--output /tmp/result.png
All flags for img2img.py:
Same flags as generate.py, plus:
| Flag | Default | Description |
|---|---|---|
--input | (required) | Path to source image |
--strength | 0.6 | How much to change the image (0=none, 1=full) |
See assets/references/config-options.md for the full list of generation parameters.
python src/drawthings/check_env.py — if not ready, run python src/drawthings/setup_env.pylist_models.py to see available model filenames; use the exact filename including extension--guidance (typical range 5–12 for SD models, 1–4 for Flux)