Nodes/ComfyUI_RP_Cast/RP Regional Detailer (Qwen)
ComfyUI Node

RP Regional Detailer (Qwen)

A thin, clever wrapper

By AISeDam·Created 6 months ago·Updated 5 months ago· 5
RP Regional Detailer (Qwen)
  • image
  • model
  • clip
  • vae
  • regional_prompts_nolora
  • regional_lora_map
  • negative
  • divide_mode
  • divide_ratio
  • image
  • debug_image
◄seed0►
◄steps20►
◄cfg1.0►
◄sampler_name▾►
◄scheduler▾►
◄denoise0.50►
◄feather0►
◄noise_masktrue►
◄force_inpainttrue►
◄shift3.0►
◄bbox_model▾►
◄detect_threshold0.30►
◄drop_size10►
◄mask_padding32►
◄mask_blur8►
◄mask_dilation4►
◄scale_to_pixel1024►
◄use_basefalse►
◄use_commontrue►
◄debugfalse►

What it is

The Qwen variant of the regional detailer, and it's honest about being one: RP Regional Detailer (Qwen) delegates entirely to the Z-Image detailer. Qwen-Image and Z-Image share enough of the latent/VAE family that the same 16-channel crop-and-inpaint pipeline works for both. The one structural difference is a quiet piece of engineering - Qwen's VAE can return a 5D tensor shaped [B, T, H, W, C], which the node normalizes to 4D [B, H, W, C] before it hits the sampler. If you've ever seen a "5D tensor" error from other Qwen nodes, this one already handles it.

What you'd set

Because it inherits the Z-Image pipeline, the model-specific advice shifts a little:

  • steps: 15~20, not Z-Image's 6~10. Qwen isn't Turbo-distilled the way Z-Image is.
  • cfg: 1.0 - recommended for Qwen's distilled variants. The usual distilled-model rule applies: CFG fights the model.
  • denoise: 0.35–0.55, same as the other detailers.
  • shift: the AuraFlow sigma shift, for Qwen.
  • Everything else - bbox_model, detect_threshold, scale_to_pixel, use_base/use_common - mirrors the Z-Image node, including the YOLO file in models/ultralytics/bbox/ and the same optional divide_mode/divide_ratio inputs.

The wiring

Standard RP chain: RPPromptParser → RPRatioParser → a plain KSampler (fine for Qwen) → this node with model/clip/vae plus a negative CONDITIONING. Outputs are image and debug_image. Region prompts are encoded as COMMON + BASE + DIV, same as every detailer in the pack - no scene-narrative merging.

The honest review

If you only run Qwen, this is the node you reach for, and the delegation means it stays maintained in lockstep with the Z-Image detailer. It's also a tidy illustration of how the pack thinks about architecture: one YOLO assignment and one inpaint pipeline, re-skinned per model family with the right latent shape, step count, and CFG. Don't expect Qwen-specific tuning beyond that - the value is that the whole regional stack now has a working Qwen path at all. Dependencies are the same trio as Z-Image: ultralytics, opencv-python, onnxruntime.

CategoryRegional Prompter

Inputs (29)

NameTypeDefaultDescription
imageIMAGE—
modelMODEL—
clipCLIP—
vaeVAE—
regional_prompts_noloraRP_SUBPROMPTS—
regional_lora_mapRP_LORA_MAP—
negativeCONDITIONING—
seedINT00–18446744073709550000—
stepsINT201–100Qwen recommended: 15~20 steps.
cfgFLOAT1.00–30CFG=1.0 recommended for Qwen distilled.
sampler_nameCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
schedulerCOMBO9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
denoiseFLOAT0.500–1img2img denoise strength. 0.35~0.55 recommended.
featherINT00–64Feather radius in pixels. Applied after dilation.
noise_maskBOOLEANtrueApply noise mask to latent before sampling.
force_inpaintBOOLEANtrueForce inpainting mode.
shiftFLOAT3.00–20AuraFlow sigma shift for Qwen.
bbox_modelCOMBO2 options: bbox/person_yolov8m-seg.pt, segm/person_yolov8m-seg.pt
detect_thresholdFLOAT0.300.1–1YOLO detection confidence threshold.
drop_sizeINT101–16384Minimum detection size (px).
mask_paddingINT320–256—
mask_blurINT80–64—
mask_dilationINT40–64—
scale_to_pixelINT102464–4096Target pixel size for upscaling. Masks smaller than this are upscaled before inpainting. Masks larger than this are processed as-is.
use_baseoptBOOLEANfalsePrepend BASE prompt to each COL prompt.
use_commonoptBOOLEANtrue—
divide_modeoptRP_DIV_MODEHorizontalConnect divide_mode from RPPromptParser.
divide_ratiooptRP_DIV_RATIOConnect divide_ratio from RPPromptParser.
debugoptBOOLEANfalsePrint debug log when enabled.

Outputs (2)

NameTypeDescription
imageIMAGE—
debug_imageIMAGE—