Nodes/ComfyUI-QwenImage-PromptExtractor/Prompt & Dimensions from LLM
ComfyUI Node

Prompt & Dimensions from LLM

Resolves a diffusion prompt and target image size from an LLM JSON hint {rewritten_prompt, wh_ratio, ratio_follow}. Either wh_ratio (used with megapixels) or ratio_follow (an uploaded image's size) determines dimensions; at least one is required.

By BleynChannel·Created 3 days ago·Updated 3 days ago· 2
Prompt & Dimensions from LLM
  • images
  • prompt
  • width
  • height
◄llm_prompt—►
◄megapixels1.0►
◄multiple8►
Categoryprompt/resolve

Inputs (4)

NameTypeDefaultDescription
llm_promptSTRINGJSON hint generated by the LLM.
megapixelsFLOAT1.00.1–16Target size in megapixels (0.1-16.0). Only used when wh_ratio is provided; ignored when ratio_follow is used.
multipleINT88–128Pixel grid that resolved width/height are rounded up to (default 8). Only used when wh_ratio is provided.
imagesCOMFY_AUTOGROW_V3Up to 10 reference images. ratio_follow can name one of them (e.g. '<image1>') to reuse its exact size.

Outputs (3)

NameTypeDescription
promptSTRING—
widthINT—
heightINT—