Nodes/ComfyUI_RP_Cast/RP Ratio Parser
ComfyUI Node

RP Ratio Parser

The quiet geometry node that decides where regions actually are

By AISeDam·Created 4 months ago·Updated 4 months ago· 4
RP Ratio Parser
  • divide_ratio
  • divide_mode
  • regional_col_n_row
  • threshold_out
threshold1.0

What it's for

The most forgettable node in the RP Cast pack, and that's a compliment. RPRatioParser sits between RP Prompt Parser and everything downstream that needs to know where regions actually are. You wire divide_ratio and divide_mode from the parser into it, set one number, and it hands out regional_col_n_row - the column/row layout that the RP KSampler, all three detailers, and the Txt2Img API nodes read to know each region's position and size.

The three inputs

  • divide_ratio (RP_DIV_RATIO): connect from RPPromptParser. The 1,1 default means equal columns.
  • divide_mode (RP_DIV_MODE): Horizontal or Vertical, matching what you set on the parser.
  • threshold (STRING, default 1.0): the interesting one. It's the end-step ratio for regional conditioning - 0 to 1, and per-region values like 0.4,0.6 work. 1.0 means each region keeps its conditioning for all sampling steps.

Why threshold matters

This is the "stop masking early" trick from the regional-prompting playbook. Masking cross-attention for the whole run gives you hard boundaries, but each region stays ignorant of the others, so the composition comes out looking like two images pasted side by side. The community's current best practice is to let conditioning blend back toward the base prompt once the composition has formed - regions keep their subjects, but the scene reads as composed. Set threshold around 0.60.8 and compare against 1.0; you'll usually prefer the lower value.

Outputs

regional_col_n_row (RP_REGIONS) → RP KSampler, the detailers, or the Txt2Img nodes. threshold_out (RP_THRESHOLD) → the sampler's threshold input.

If an RP workflow ever places a character in the wrong region, this is the node to stare at - the geometry is computed here, before any sampling happens. Otherwise, wire it once and forget it exists.

Install-wise it ships with the pack: ComfyUI Manager → search "ComfyUI_RP_Cast", or git clone https://github.com/AISeDam/ComfyUI_RP_Cast into custom_nodes/ and restart. It adds no dependencies of its own - the pack's optional heavies (ultralytics, opencv) only matter for the detailer nodes.

CategoryRegional Prompter

Inputs (3)

NameTypeDefaultDescription
divide_ratioRP_DIV_RATIO1,1
divide_modeRP_DIV_MODEHorizontal
thresholdSTRING1.0End step ratio for regional conditioning (0~1). Per-region: '0.4,0.6'. 1.0=apply for all steps.

Outputs (2)

NameTypeDescription
regional_col_n_rowRP_REGIONS
threshold_outRP_THRESHOLD