DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to rewrite a short prompt with the 9B enhancer before rendering with Qwen Image 2 1 Studio

Let the PE enhancer expand a rough idea and pick the aspect ratio before the image model runs.

Short answer: Run uv sync and download the image model; then 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-T2I and export QWEN_IMAGE_21_PATH=~/models/Qwen-Image-2.1. All steps.

  • Content
  • Intermediate
  • 3 hours
  • From the README
  • Any agent

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

  1. Run uv sync and download the image model.
  2. Download the text enhancer with hf download Qwen/Qwen-Image-2.1-PE-T2I --local-dir ~/models/Qwen-Image-2.1-PE-T2I.
  3. Run export QWEN_IMAGE_21_PE_T2I_PATH=~/models/Qwen-Image-2.1-PE-T2I and export QWEN_IMAGE_21_PATH=~/models/Qwen-Image-2.1.
  4. Run uv run qwen-image-2-1 "a corgi playing guitar in the rain" --enhance and 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

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer