Dev reverse-engineers Qwen Image 2.1 PE, ships ComfyUI node that auto-computes dimensions

BleynSpecnaz · reddit · 2026-09-24

While experimenting with Qwen Image 2.1 Prompt Enhancer (PE), the author found its official system prompts make the model output structured JSON: T2I returns rewrittenprompt plus whratio (e.g. 3:2), while I2I adds a ratiofollow field indicating which reference image's dimensions to follow.

He built a ComfyUI custom node, Prompt & Dimensions from LLM, that parses this JSON and auto-computes exact latent width/height:

He tested with GGUF quants of PE paired with ComfyUI-ThinkingLLM; Kijai's safetensors weights via the standard TextGeneration node also work. The node is on ComfyUI Manager and GitHub.

He also notes PE adds grounded scene details (spatial context, distant text, lighting, object interactions) rather than stylistic fluff, and the parsed text can feed other pipelines like Flux Dev, Klein, or Krea 2.

Original post →

More from coding & agent

coding & agent channel →