Who it is forA creator with a brief one-line idea who wants a more detailed prompt without writing it by hand.
The problemA short prompt often gives a generic image, and writing a detailed prompt takes time for each render.
The outcomeA render made from an enhanced prompt, with the ratio chosen by the enhancer unless you set one.
What you need first
- A Mac with Apple Silicon and 64 GB of unified memory, the setup the README says it is built and tested on
- uv and git installed
- Roughly 30 GB of disk for the image model weights, plus about 18 GB per enhancer if you use --enhance
- Access to the Hugging Face Hub for the weight downloads
Steps
- Run
uv syncand download the image model. - Download the text enhancer with
hf download Qwen/Qwen-Image-2.1-PE-T2I --local-dir ~/models/Qwen-Image-2.1-PE-T2I. - Run
export QWEN_IMAGE_21_PE_T2I_PATH=~/models/Qwen-Image-2.1-PE-T2Iandexport QWEN_IMAGE_21_PATH=~/models/Qwen-Image-2.1. - Run
uv run qwen-image-2-1 "a corgi playing guitar in the rain" --enhanceand compare the render with a run that has no --enhance.
Prompt for your agent
In the qwen-image-2.1-studio repo, export QWEN_IMAGE_21_PE_T2I_PATH and QWEN_IMAGE_21_PATH to local model directories, then run `uv run qwen-image-2-1 "<short prompt>" --enhance`. Expect output/output.png rendered from a rewritten prompt. Verify the image shows more detail than the short prompt alone.
Caveat. The enhancer weights add about 18 GB of disk, and the README says --think can make a render slower by minutes.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for janishar/qwen-image-2.1-studio and "Rewrite a short prompt with the 9B enhancer before rendering"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer