User reported the model writing a multi-paragraph 'editing plan'
instead of calling edit_image, only firing the tool when explicitly
told to. Two underlying causes:
1. The previous system prompt was conversational ('ALWAYS / NEVER'
lists with discussion) — Qwen-style models read that as topics
to think about rather than rules to obey. Replaced with terse,
imperative dispatcher framing: 'You do not respond in prose.
Every user message MUST result in exactly one tool call.'
2. Qwen 3.x ships with thinking mode on by default. Reasoning
models almost universally degrade native function calling — they
plan how to use a tool instead of just calling it. Prepended
/no_think (Qwen 3.x recognises this token and skips reasoning).
No-op for non-Qwen-3 base models.
Removed the long after-action paragraph that encouraged elaborate
follow-ups; replaced with 'at most one short sentence'.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
6.4 KiB
Image Studio — dedicated image-generation chat model
A custom Open WebUI model preset that wraps a base LLM with a system
prompt heavily biased toward calling the smart_image_gen tool. Users
pick Image Studio from the chat-model dropdown when they want to
generate or edit images, and the LLM treats every message as an image
request — calling generate_image for new images and edit_image for
modifications to attached ones.
This exists because general-purpose chat models often "describe" an image in text instead of calling the tool, especially when the request is conversational ("can you draw me…", "I'd like a picture of…"). A dedicated preset removes the ambiguity.
Two ways to install
Option A: Import the JSON (fast)
Workspace → Models → Import (top right) → upload
image_studio.json.
This drops the preset in fully configured: base model, system prompt, tool attachment, function-calling mode, temperature, suggestion prompts. Verify after import:
- The
smart_image_gentool is actually attached (Tools list under the model's edit screen). If not, the tool ID Open WebUI assigned doesn't match thetoolIds: ["smart_image_gen"]in the JSON — re-attach manually. - Base Model is set to
mistral-nemo:12b. Adjust if you want a different LLM (Qwen3.6 or Llama 3.1 also work well; smaller parameter counts may struggle with native tool calling).
Option B: Create manually (table below)
Workspace → Models → + (top right).
| Field | Value |
|---|---|
| Name | Image Studio |
| Base Model | mistral-nemo:12b (best tool-caller in this stack) |
| Description | Image generation and routing across SDXL checkpoints. |
| System Prompt | Paste the block from System prompt below. |
| Tools | enable only smart_image_gen |
In the Advanced Params section:
| Field | Value |
|---|---|
| Function Calling | Native (mandatory) |
| Temperature | 0.5 (lower = more reliable tool-calling) |
| Top P | 0.9 |
| Context Length | leave default |
Save. The new model appears in the chat-model dropdown for any user with access.
System prompt
/no_think
You are an image-tool dispatcher. You do not respond in prose. Every
user message MUST result in exactly one tool call.
ROUTING:
- If the user attached an image → call edit_image(edit_instruction, style, denoise)
- Otherwise → call generate_image(prompt, style)
Fire the tool on the FIRST message, with no preamble. Do not write a
'plan', 'approach', 'steps', 'breakdown', or any explanation before
calling. Do not ask clarifying questions. Do not say what you are
about to do. If the request is vague, pick reasonable defaults and
call the tool — the user iterates after.
STYLES (pick one):
photo photorealistic photo / portrait / cinematic
juggernaut alternate photoreal — sharper, more saturated
pony anime, cartoon, manga, stylised illustration
general catch-all when nothing else fits
furry-nai anthropomorphic, NAI-trained mix
furry-noob anthropomorphic, NoobAI base
furry-il anthropomorphic, Illustrious base (default for any
furry/anthro request)
For edit_image, pick style for the DESIRED OUTPUT, not the input
image. Default denoise 0.7. Use 0.3–0.5 for subtle changes (recolor,
style transfer) and 0.85–1.0 for radical reimaginings.
Write rich, descriptive prompts (subject, action, environment,
lighting, mood, framing). Do NOT add quality tags like 'masterpiece',
'best quality', 'score_9', 'absurdres' — the tool prepends the
correct tags per style. Do NOT set sampler, CFG, steps, scheduler —
the tool picks them.
AFTER the tool returns, write at most one short sentence noting your
style choice and offering one iteration idea. The image is already
shown to the user; do not describe it.
The first line /no_think disables Qwen 3.x's reasoning phase. If
your base model isn't Qwen 3, leaving it in is a no-op (other models
ignore it). Drop it only if it actually causes problems.
Vision capability
The shipped preset sets meta.capabilities.vision: true so Open WebUI
allows users to attach images to chats with this model. Two paths:
Quick path — non-vision LLM with vision flag enabled (default)
mistral-nemo:12b isn't a vision model. With vision: true in the
preset, Open WebUI still permits image uploads; the image flows through
to edit_image via the tool's __messages__ / __files__ injection
and ComfyUI does the visual work in img2img. The LLM doesn't need to
"see" the image — it just needs to recognise the user attached one
and call edit_image with the user's instruction.
Limitation: the LLM can't answer questions like "what's in this image?" or "describe this" — it never sees pixels. Editing with an explicit instruction works fine.
Better path — actual vision-capable LLM
Swap the base model to one that can see. Recommended Ollama tags:
qwen2.5vl:7b— small, modern, good visionllama3.2-vision:11b— Meta's vision variant, ~7 GBminicpm-v:8b— fast, capable, good for editing tasks
Pull one via the Ollama init script or the Open WebUI model UI, then edit Image Studio's Base Model field to point at it. The LLM can now write smarter edit instructions ("the dog in the foreground is backlit, route to photo style with denoise 0.5 to preserve the rim light") and confirm what it sees before generating.
To preseed automatically, add to init-models.sh:
ollama pull qwen2.5vl:7b
Then change base_model_id in image_studio.json (or the Base Model
field if you imported manually) to qwen2.5vl:7b.
Why this works when a generic chat model didn't
- The system prompt is unambiguous. No room for the model to decide "I'll just describe it in text instead."
- Only one tool is attached. No competing tools to choose between.
- Native function calling is mandatory. The "Default" mode in Open WebUI uses prompt-injection tool emulation that fails silently on a lot of local models.
- Lower temperature. Tool calling is more reliable with less sampling randomness.
Iterating on the system prompt
If users ask for things you didn't anticipate (specific aspect ratios, multi-image batches, particular checkpoints not in the routing rules), edit the system prompt above and re-paste into the Workspace → Models entry. It's the highest-leverage place to tune behaviour without touching the Tool's Python.