Authorization notice. Awesome Qwen Image is dual-use. Only use it on software, sites and systems you own or have explicit permission to test.
Who it is forA content creator who writes short requests in any language and wants a detailed English prompt.
The problemBrief prompts often produce weak images, and manual rewriting takes time.
The outcomeA detailed English prompt and a recommended aspect ratio you can map to an image size.
What you need first
- A runtime that matches the chosen entry point: Diffusers, ComfyUI, llama.cpp, or MLX on Apple Silicon
- Enough disk space: the base text encoder alone is about 17.5 GB in BF16
- A GPU with 8 to 12 GB VRAM for the INT4 ConvRot pack, or a Mac with Apple Silicon for MLX-4bit
- Acceptance of the Qwen Research License that covers the base weights
Steps
- Download the full Qwen/Qwen-Image-2.1-PE-T2I repo, since it splits into shards with an index and has no single-file build.
- Load it with AutoModelForCausalLM and AutoTokenizer and use its system_prompt.txt.
- Send the short request and read the output, which is JSON after a reasoning block.
- Split the output on the think-tag before parsing the JSON.
- Use the returned wh_ratio to pick the image size, then pass the rewritten prompt to your image model.
Prompt for your agent
Using wildminder/awesome-qwen-image, load the Qwen/Qwen-Image-2.1-PE-T2I rewriter with AutoModelForCausalLM and AutoTokenizer, rewrite the request <request> using its system_prompt.txt, and return the English prompt and wh_ratio as JSON. Verify that you split the output on the think-tag before parsing JSON.
Caveat. The official rewriter is a 9B model at about 18.8 GB, so the lighter Pocket 2B or 0.8B builds are the option for smaller machines.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for wildminder/awesome-qwen-image and "Rewrite short requests into detailed image prompts"
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