OpenClaw Draw Things
OpenClaw 使用 Draw Things CLI 在 Apple Silicon 上进行本地 AI 图像生成,支持 Stable Diffusion、FLUX 等模型,无 API 成本。
功能
- 🖼️ 本地图像生成 - 无需 API 密钥
- 🍎 Apple Silicon 优化 - 使用 Core ML 进行快速推理
- 🤖 多模型支持 - SD、FLUX 等
- ⚡ OpenClaw 集成 - 原生工具支持
安装
前置条件
- Apple Silicon (M1/M2/M3) 的 macOS
- 安装 Draw Things 应用
- OpenClaw 2026.4.0 或更高版本
从 ClawHub 安装
openclaw plugins install draw-things
手动安装
配置
在 ~/.openclaw/openclaw.json 中添加:
配置选项
使用
安装并配置后,OpenClaw 可以生成图像:
模型
从 Draw Things 模型浏览器下载模型。常见模型包括:
开发
许可
MIT © Andres Rovira
链接
OpenClaw Draw Things
Local AI image generation for OpenClaw using Draw Things CLI on Apple Silicon. Generate images with Stable Diffusion, FLUX, and other models without API costs.
Features
- 🖼️ Local image generation - No API keys needed
- 🍎 Apple Silicon optimized - Uses Core ML for fast inference
- 🤖 Multiple models - SD, FLUX, and more
- ⚡ OpenClaw integration - Native tool support
Installation
Prerequisites
- macOS with Apple Silicon (M1/M2/M3)
- Draw Things app installed
- OpenClaw 2026.4.0 or later
Install from ClawHub
openclaw plugins install draw-things
Manual Installation
Configuration
Add to your ~/.openclaw/openclaw.json:
{
"plugins": {
"entries": {
"draw-things": {
"enabled": true,
"config": {
"cliPath": "draw-things-cli",
"outputDir": "~/Downloads/draw-things-output",
"defaultModel": "realistic_vision_v5.1_f16.ckpt",
"defaultWidth": 1024,
"defaultHeight": 1024,
"defaultSteps": 20,
"defaultCfg": 7
}
}
}
},
"agents": {
"defaults": {
"imageGenerationModel": {
"primary": "draw-things/realistic_vision_v5.1_f16.ckpt"
}
}
}
}
Config Options
| Option | Type | Default | Description |
| `cliPath` | string | `draw-things-cli` | Path to Draw Things CLI binary |
| `modelsDir` | string | - | Optional override for models directory |
| `outputDir` | string | `~/Downloads/draw-things-output` | Where to save generated images |
| `defaultModel` | string | - | Default model file (e.g., `flux_2_klein_4b_q6p.ckpt`) |
| `defaultWidth` | number | 1024 | Default output width (multiple of 64) |
| `defaultHeight` | number | 1024 | Default output height (multiple of 64) |
| `defaultSteps` | number | 20 | Sampling steps (higher = better quality, slower) |
| `defaultCfg` | number | 7 | CFG guidance scale (higher = stricter prompt adherence) |
Usage
Once installed and configured, OpenClaw can generate images:
Generate an image of a sunset over mountains
Or use explicit tool calls:
Use image_generate to create a cartoon cat
Models
Download models from the Draw Things model browser. Common models include:
realistic_vision_v5.1_f16.ckpt - Photorealistic images
flux_2_klein_4b_q6p.ckpt - FLUX.2 Klein 4-bit quantized
sd_xl_base_1.0_f16.ckpt - Stable Diffusion XL
Place models in ~/Library/Containers/com.liuliu.draw-things/Data/Documents/Models/ or specify a custom modelsDir in config.
Development
npm install
npm run build
npm run dev # Watch mode
npm test # Run tests
License
MIT © Andres Rovira
Links