MOSS-Image Prompt Enhancer
An Ollama model that turns short image ideas into detailed prompts for the MOSS-Image (https://github.com/OpenMOSS/MOSS-Image) text-to-image model.
It is based on the official moss-image-prompt-enhancer skill (https://github.com/OpenMOSS/MOSS-Image/tree/main/skills/moss-image-prompt-enhancer), packaged as a local model so it can run offline without an agent.
What it does
Give it a rough idea, get back only the enhanced prompt (no preamble, no explanations).
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:
Keeps your intent: subject, style, counts, exclusions, and exact visible text are preserved.
Avoids filler: no quality-tag lists, no negative prompts, no invented slogans or watermarks. Minimalist requests stay minimalist.
People always get an age and an ethnicity. If you give them, they are used exactly. If not, they are inferred from context (a Seoul night market gives Korean, "grandmother" gives elderly). With no clues the model picks one.
Honors an explicit mode ("Layout mode, 1024x1536: ...", "Caption mode: ...") and an explicit canvas size.
Run directly from Ollama
To run the model directly from Ollama.com, use the following command:
ollama pull DutchIT/moss-image-prompt-enhancer
ollama run DutchIT/moss-image-prompt-enhancer "a woman reading in a cafe"Install
git clone https://github.com/royen99/moss-image-prompt-enhancer
cd moss-image-prompt-enhancer
ollama create moss-prompt-enhancer -f ModelfileThe first run downloads the base model. Re-run the same command after editing the Modelfile; unchanged layers are reused.
Usage
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.
Caption mode
Just describe the image:
a grandmother knitting by a window, watercolor style
Layout mode
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:
Get compile_prompt.py from the [skill's scripts folder](https://github.com/OpenMOSS/MOSS-Image/tree/main/skills/moss-image-prompt-enhancer/scripts). 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.
## Usage in ComfyUI
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).
Usage in ComfyUI
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).


