17 Downloads Updated yesterday
ollama run dutchit/moss-image-prompt-enhancer
Updated yesterday
yesterday
bddb6c3b743f · 5.0GB
An Ollama model that turns short image ideas into detailed prompts for the MOSS-Image text-to-image model.
It is based on the official moss-image-prompt-enhancer skill, packaged as a local model so it can run offline without an agent.
Give it a rough idea, get back only the enhanced prompt (no preamble, no explanations).
| Mode | Used for | Output |
|---|---|---|
| Caption (default) | Photos, portraits, landscapes, illustrations, paintings | One cohesive English prose description |
| Layout | Posters, infographics, multi-panel images, exact text placement | A JSON draft with pixel bounding boxes |
Behavior:
See examples/outputs.md for real outputs.
huihui_ai/qwen3-abliterated:8b (about 5 GB download; roughly 8 GB of RAM or VRAM is comfortable)git clone https://github.com/royen99/moss-image-prompt-enhancer
cd moss-image-prompt-enhancer
ollama create moss-prompt-enhancer -f Modelfile
The first run downloads the base model. Re-run the same command after editing the Modelfile; unchanged layers are reused.
ollama run moss-prompt-enhancer "a woman reading in a cafe"
Or through the API:
curl http://127.0.0.1:11434/api/generate -d '{
"model": "moss-prompt-enhancer",
"prompt": "a street food vendor at a night market in Seoul",
"stream": false
}'
Paste the result into MOSS-Image (for example in ComfyUI) as the positive prompt.
Just describe the image:
a grandmother knitting by a window, watercolor style
Ask for it explicitly, or use a poster, infographic, or multi-panel idea. State the canvas size if you care about it:
Layout mode, 1024x1536: a jazz concert poster. Title "SUMMER JAZZ NIGHT", below it "Friday 8 PM\nBlue Door Cafe". A saxophone player in the middle.
The model returns a draft with plain pixel boxes (bbox_coord_space: "abs", bbox_format: "xyxy", [x_min, y_min, x_max, y_max] from the top-left). MOSS-Image expects centered yxyx coordinates, so the draft must be compiled before use. The official skill ships the compiler:
python3 compile_prompt.py draft.json --output prompt.txt
Get compile_prompt.py from the skill’s scripts folder. It rejects invalid or out-of-bounds boxes. Use the width and height from the draft as the image size when generating. The compiled prompt itself does not contain the dimensions.
The model is not asked to do the coordinate arithmetic because small models get it wrong.
For usage within ComfyUI I would recommend using the simple comfyui-ollama node without any special settings. Simply connect a input textbox to the prompt connector (no system prompt input needed).
Defined in the Modelfile:
| Parameter | Value | Why |
|---|---|---|
temperature |
0.7 | Some creative variety |
top_p / top_k |
0.8 / 20 | Qwen3 recommended non-thinking sampling |
num_ctx |
8192 | Fits the system prompt, examples, and output |
num_predict |
2048 | Caps runaway output |
The Modelfile holds the full system prompt and a few example conversations (few-shot) that teach the layout format.
Modelfile system prompt, parameters, few-shot examples
examples/
inputs.jsonl 20 test prompts with expected mode and focus checks
outputs.md real model outputs and known issues
images/ optional generated images for the examples
tests/
evaluation.md manual checklist for scoring outputs
Run each prompt from examples/inputs.jsonl against the model and score the result with tests/evaluation.md. Because the model is sampled, run each prompt a few times.
This runs on an 8B model, so rule-following is imperfect. Observed issues are listed in examples/outputs.md. In short:
object instead of character.A larger base model follows the rules more reliably. To try one, change the FROM line in the Modelfile.
The default base model, huihui_ai/qwen3-abliterated:8b, is a Qwen3 variant with its refusal behavior removed. That keeps it from refusing ordinary creative prompts, but it also means the model has no built-in safety filtering. The system prompt does not add content restrictions. Add your own if you plan to expose the model to other people.
If it prints <think> blocks, disable thinking (ollama run --think=false moss-prompt-enhancer, or /set nothink in a session).
skills/moss-image-prompt-enhancer.This project is not affiliated with OpenMOSS or Alibaba. Check the licenses of the upstream projects above before redistributing.
Licensed under the Apache License 2.0.