README.md
An LM Studio plugin for generating images via draw-things-cli directly in the LM Studio chat. Generated images are displayed inline without any additional tools.
Built with vibe coding assistance from Claude (Anthropic).
The Draw Things app must be installed on your Mac — draw-things-cli shares its models and configuration with the app.
draw-things-cli is a standalone tool distributed via Homebrew. Installation compiles the project from source using Swift (Apple Developer Tools required) and takes 20–40 minutes.
Verify installation:
draw-things-cli --version draw-things-cli models list --downloaded-only
In LM Studio → Plugins → search for lojza3d/draw-things-cli.
git clone https://github.com/lojza3d/draw-things-cli-for-lm-studio cd draw-things-cli-for-lm-studio npm install lms dev
After installation, the plugin exposes a settings panel in LM Studio:
| Field | Description | Default |
|---|---|---|
| Path to draw-things-cli | Absolute path to the binary | /opt/homebrew/bin/draw-things-cli |
| Default Model | Model filename (.ckpt) — optional | (empty) |
| Output Directory | Directory for saving PNG files — empty = session working dir | (empty) |
| Default Width | Image width in px | 1024 |
| Default Height | Image height in px | 768 |
| Default Steps | Number of diffusion steps | 8 |
| Default CFG Scale | Classifier-free guidance scale | 1 |
| Default Seed | Generation seed (-1 = random) | -1 |
| Generation Timeout | Timeout in seconds | 300 |
| Convert chat images to JPEG | Compress images displayed in chat | off |
| JPEG Quality | JPEG quality 0–100 | 85 |
If empty, the plugin saves images directly to the session working directory — LM Studio displays them inline automatically.
If set (e.g. ~/Downloads), the plugin saves the PNG there and also copies it to the session working directory for inline display in chat.
Recommended setup: use Output Directory for archiving the generated images (if you need to) and set JPEG compression on (at about 85) to keep the actual size of the chat files smaller on disk.
When enabled, the plugin compresses the image to JPEG before displaying it in chat. The PNG in the Output Directory is never touched — only the copy in the session working directory is converted.
Generates an image. Only prompt is required.
| Parameter | Required | Description |
|---|---|---|
prompt | ✓ | Description of the image to generate |
model | — | Model filename — overrides the plugin setting |
negative_prompt | — | What to avoid in the image |
width | — | Image width in px |
height | — | Image height in px |
steps | — | Number of diffusion steps |
cfg | — | CFG scale |
seed | — | Generation seed (negative = random) |
Lists all downloaded Draw Things models. No parameters.
Adjust to your needs, add it to existing system prompt.
You have access to a Draw Things image generation tool running locally on this Mac. When the user asks to generate, create, or draw an image: 1. Call generate_image with a detailed prompt describing the image. 2. All parameters except 'prompt' are optional — use them only if the user specifies something (model, size, style, seed...). 3. After successful generation, include the `markdown` attribute (image link) in your response to display the image inline. 4. If generation fails, report the error to the user and do NOT retry automatically. If the user asks which models are available, call list_dt_models.
-1) produces a random result on every generation (or should - in such a case, the --seed attribute is not passed to draw-things-cli at all as the --seed -1 triggers an error).draw-things-cli requires Draw Things to be installed even if the app itself is not running.⚠️ This plugin is working, but testing is ongoing. If you spot any trouble, feedback is welcome.
# Make sure Xcode is active, not just Command Line Tools
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
# Install (compiles from source — be patient)
brew install --HEAD drawthingsai/draw-things/draw-things-cli