Nodes/MOSS Layout from Qwen-VL/MOSS Layout from Qwen-VL
ComfyUI Node

MOSS Layout from Qwen-VL

A ComfyUI node in MOSS-Image with 25 inputs and 6 outputs.

By leroy989·Created 23 days ago·Updated 18 days ago· 16
MOSS Layout from Qwen-VL
  • image
  • clip
  • prompt
  • preview
  • raw_qwen_output
  • width
  • height
  • scaled_image
◄modeFrom image►
◄prompt►
◄metaphoto►
◄targetsperson►
◄megapixels1.00►
◄resolution_steps16►
◄upscale_methodlanczos►
◄width0►
◄height0►
◄coord_modenormalized_0_1000►
◄max_new_tokens4096►
◄temperature0.20►
◄seed0►
◄aspect_ratio1:1►
◄hf_modelQwen/Qwen3-VL-8B-Instruct►
◄keep_loadedfalse►
◄change_request►
◄box_padding0.0►
◄smart_modefalse►
◄max_items40►
◄style_in_itemstrue►
◄depth_orderback to front►
◄enable_thinkingfalse►
CategoryMOSS-Image

Inputs (25)

NameTypeDefaultDescription
modeCOMBOFrom imageFrom image: detect and caption a reference image. From prompt (experimental): no image, Qwen designs the whole box layout from your prompt.
promptSTRINGPrompt mode only: describe the image you want. Qwen turns it into a full box layout.
metaSTRINGphotoStyle lock. Comma-separated tags, e.g. photo, poster. The overall caption is built around them (added if Qwen forgets) and words from other styles are stripped from all captions. In prompt mode, leave empty to take the style from your prompt.
targetsSTRINGpersonImage mode: one thing to detect per line (extra when smart_mode is on). Prompt mode: elements that must be included. For text, say so explicitly, e.g. 'title text EXPLORE'.
megapixelsFLOAT1.000–16Image mode: the image is scaled to this many total megapixels (0 = keep original size). Prompt mode: size of the canvas.
resolution_stepsINT161–256Width and height are snapped to a multiple of this. MOSS needs multiples of 16.
upscale_methodCOMBOlanczosImage mode: resampling used to scale the image.
widthINT00–81920 = automatic. Set both width and height to force a canvas size instead (rounded to 16).
heightINT00–81920 = automatic. Set both width and height to force a canvas size instead (rounded to 16).
coord_modeCOMBOnormalized_0_1000Qwen3-VL/3.5 use normalized 0-1000. Use absolute_pixels for Qwen2.5-VL style models. Ignored in prompt mode.
max_new_tokensINT4096256–16384—
temperatureFLOAT0.200–2—
seedINT00–18446744073709550000—
imageoptIMAGEReference image (image mode).
aspect_ratiooptCOMBO1:1Prompt mode: canvas shape. Combined with megapixels and resolution_steps (or set width and height).
clipoptCLIPQwen3-VL / Qwen3.5-VL loaded as a text encoder. If unconnected, hf_model is used.
hf_modeloptSTRINGQwen/Qwen3-VL-8B-InstructHF repo id or local folder. Used only when clip is not connected.
keep_loadedoptBOOLEANfalseHF path only: keep Qwen in memory after running.
change_requestoptSTRINGImage mode: edits to make, one per line (e.g. 'make the dress red', 'add a dog on the left'). Prompt mode: extra instructions for the layout.
box_paddingoptFLOAT0.00–25Grow every box by this % of its size on each side (clamped to the canvas).
smart_modeoptBOOLEANfalseImage mode: Qwen decides what to detect by itself (people and their body parts, clothing, objects, background regions). Anything in targets is still included.
max_itemsoptINT405–120Smart mode and prompt mode: maximum number of regions Qwen may return.
style_in_itemsoptBOOLEANtrueEvery item caption must carry the meta style ('Rendered as <meta>.' is added if it doesn't). Turn off to keep style only in the overall caption.
depth_orderoptCOMBOback to frontQwen assigns each item a depth layer, captions say what is in front of or behind what, and items are sorted by it. 'off' keeps Qwen's own order.
enable_thinkingoptBOOLEANfalseLet Qwen reason before answering. Can be more accurate, but the reasoning uses up max_new_tokens and can cut the JSON off. Keep off for smart mode.

Outputs (6)

NameTypeDescription
promptSTRING—
previewIMAGE—
raw_qwen_outputSTRING—
widthINT—
heightINT—
scaled_imageIMAGE—