Nodes/DOGMA Nodes/DOGMA QwenPromptEnhance 1.0.22
ComfyUI Node

DOGMA QwenPromptEnhance 1.0.22

A local VLM that rewrites your edit prompt

By axior·Created 6 months ago·Updated 2 days ago· 2
DOGMA QwenPromptEnhance 1.0.22
  • image
  • reference_image
  • prompt
  • enhancer_report
◄prompt—►
◄enabledfalse►
◄use_referencefalse►
◄reference_instruction►
◄model_nameqwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensors►
◄max_tokens4096►
◄seed1976►

You type a rough instruction, a language model reads your image and rewrites it as a proper edit prompt, and the rewritten text goes to your sampler. It is the local-LLM prompt-enhancer pattern the KB documents, wired into this pack's phase-3 pipeline - and the model here is not a general chat model. It is the official Qwen Qwen-Image-Edit prompt-enhancer text encoder, loaded as a text-generation model.

That distinction matters. A general-purpose LLM writing prompts for an edit model is doing translation between two things that speak different languages. This model was built to describe edits for exactly the family of models DOGMA drives, which is why the output tends to read like a usable instruction rather than a paragraph of vibes.

How it works

With enabled off, this node is a pass-through and says so in its report - the prompt comes out unchanged and nothing is loaded. Turn it on and it does the following: resolves model_name inside ComfyUI's text_encoders folder and raises a pointed error if the file is not there; resizes your image to 1024 on the long side; optionally adds a reference image as a second input to the batch; loads the CLIP through CLIPLoader with the qwen_image type; and calls the core TextGenerate node with an explicit deterministic-ish sampling config - temperature 1.0, top-k 20, top-p 0.95, min-p 0.05, repetition penalty 1.05, thinking disabled, capped at max_tokens.

Two bits of cleanup are worth knowing about, because they are the kind of detail that tells you someone actually used this. Any <think>...</think> block is stripped before the result is returned. And if your original prompt starts with an all-caps trigger token like QLCMDAY70, the node checks whether the rewrite kept it and re-prepends it if it did not - a small guard against an enhancer that quietly drops your LoRA trigger. If the model returns nothing at all, the node raises instead of feeding an empty prompt downstream.

Inputs and outputs

  • prompt - what you would have typed.
  • enabled (off) - the pass-through switch.
  • image - your image; it is a lazy input, so with the enhancer off nothing pulls it.
  • use_reference + reference_instruction - when both are on with a reference_image, the node adds a second image panel and appends your instruction to the prompt.
  • model_name - defaults to qwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensors.
  • max_tokens (4096) and seed (1976).

Outputs: prompt (STRING, wire it into the conditioning path) and enhancer_report (STRING). The report is deliberately short and tells you the model family, how many images went in, and the token cap - because you should be reviewing the effective prompt before committing it.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/axior/ComfyUI-DOGMA-Nodes

Or ComfyUI Manager → DOGMA Nodes. The pack's pip dependency list is only scipy>=1.10, but this node needs two things beyond it: a ComfyUI new enough to have the core TextGenerate and BatchImagesNode nodes, and the prompt-enhancer weights in ComfyUI/models/text_encoders/ under exactly the filename in model_name. The error message names the file for you, which is the right way to do it.

Where people get burned

Missing weights presented as a broken node. Until the safetensors file exists at that path, enabling this raises. Half the pack's other nodes will run fine without it; keep the switch off in saved workflows you share.

Treating the rewrite as authoritative. Local enhancers invent detail. The KB's own read on this is that a local model removes the blank-page problem and is not a writer, and multi-subject images are where rewrites go wrong - an instruction about "the sign" can come back describing a different object in frame. Look at the output before you waste a render.

Trigger loss. The node catches an all-caps trigger at the start of the prompt, not a trigger in the middle of a sentence. If your LoRA trigger is lowercase or buried, check the effective prompt yourself.

CategoryDOGMA/v1.0.22

Inputs (9)

NameTypeDefaultDescription
promptSTRING—
enabledBOOLEANfalse—
imageIMAGE—
use_referenceBOOLEANfalse—
reference_instructionSTRING—
model_nameSTRINGqwen3.5_9b_qwen_image_2.1_pe_i2i.int8_convrot.safetensors—
max_tokensINT4096256–16384—
seedINT19760–18446744073709550000—
reference_imageoptIMAGE—

Outputs (2)

NameTypeDescription
promptSTRING—
enhancer_reportSTRING—