ComfyUI Node

RS Character Interaction

Give the Blur Between Two Characters a Few Extra Steps Before It Loosens

By raspie10032·Created 9 days ago·Updated 3 days ago· 4
RS Character Interaction
  • building_pipe
  • RS_MC_BUILD_PIPE
◄presetbaseline►
◄delay_steps6►
◄decrement0.20►

If you've done regional prompting for more than an afternoon, you know the pattern: the first ten steps build two clean, separate people, and then the boundaries start to soften and the left character's jacket migrates onto the right one. That's not a bug in your workflow. It's the technique working as designed - you hold the character separation hard while composition forms, then let it decay so the image can become a single coherent picture instead of two collages badly stitched together.

RS Character Interaction is the little node that lets you stretch the hold period without touching the decay for everything else. It's the most surgical node in the pack, and honestly the one most people should add and then mostly ignore.

What it actually does

The sampler behind this pack applies a weak negative bias on self-attention between pixels that belong to different characters. Not a hard block: the code computes log1p(-separation), so a value of 0.2 leaves foreign keys about 80% of their pre-softmax prior. That bias then decays over scheduled steps - hold for N steps, then decrement per evaluation. That's the "hold and decay" pattern the whole regional-prompting craft is built on.

This node adds a second, parallel schedule that applies only to exclusive cells - sliding-window cells owned by exactly one character. Look at protected_self_bias() in the pack's routing.py and that's literally the loop: if a cell has one owner and the cell it's comparing against has a different single owner, it gets the extra penalty. Cells with two owners (the overlap region) and background cells are skipped entirely.

So the pitch in the node description - "preserve non-overlapping character separation longer while overlapping regions keep their normal schedule" - is exactly what the math does. Where your characters touch or embrace, nothing changes. Where they're apart, the boundary that stops them from cross-pollinating survives a few steps longer.

The inputs that matter

Three required widgets and one optional input:

  • preset - baseline, delay3, delay6 or custom. Baseline is a genuine no-op, which is handy: leave it in the graph permanently and flip it on when you have a problem.
  • delay_steps - custom only. How many extra scheduled steps the exclusive boundaries hold before they start to decay. Default 6, range 0–30.
  • decrement - custom only. How fast the extra separation fades per scheduled step, 0.01 to 1, default 0.2.

Worth knowing: on delay3 and delay6 the decay rate isn't the widget value, it's inherited from the sampler's own boundary decrement. The widgets are only read when you pick custom. People set delay_steps on delay3, see no difference, and file it as broken - it isn't, you're just in the wrong mode.

The optional building_pipe input is the pack's assembly pipe. Connect the output of Character Prompt / LoRA / Position / Mask into it, and take the single RS_MC_BUILD_PIPE output on to Finalize Character Pipe, then into the sampler. Builder order is free - the pack resolves slots by character number, not by wire order. If you connect nothing, the node still emits a valid pipe with just the interaction settings in it, so you can tee it in anywhere on the line.

Install

Same as the rest of the pack - one install, everything shows up:

cd ComfyUI/custom_nodes
git clone https://github.com/raspie10032/ComfyUI_RS_MultiCharacter_Sampler.git

Restart ComfyUI and refresh the browser. Or search RS MultiCharacter Sampler in ComfyUI-Manager, package id comfyui-rs-multicharacter-sampler. Base install needs Python 3.11+, Torch, NumPy and Pillow - there's no requirements.txt for the core, the only optional ones are for the detailer and the reference node.

You'll find this node under RS MultiCharacter/Characters.

Where people get burned

It only exists on Anima, SDXL and (experimentally) SD1.5. Ask for extra separation on FLUX, Krea 2 or MOSS and the sampler raises an error instead of silently ignoring you. baseline is safe everywhere, so a workflow you share with a FLUX user won't break as long as you left the preset alone.

It is not a pose or contact tool. The author is blunt about this: the SDXL comparison of body-part and interaction guidance did not demonstrate better high-five accuracy. What this fixes is identity bleed - hair colour, clothing, the wrong jacket on the wrong person. Two people hugging will still come out an ambiguous blob of limbs, and that's the model, not the node.

Don't stack it on an already-tuned sampler. Add it after you have a baseline you like, and change one preset step at a time. Pushed too far you get two beautifully distinct characters with a visible seam between them - the exact failure the "stop masking early" advice exists to avoid.

CategoryRS MultiCharacter/Characters

Inputs (4)

NameTypeDefaultDescription
presetCOMBObaselineDelay only non-overlapping character boundaries. Overlap and background keep the sampler schedule.
delay_stepsINT60–30Custom only: extra scheduled steps before exclusive boundaries decay.
decrementFLOAT0.200.01–1Custom only: exclusive separation decrease per scheduled step.
building_pipeoptRS_MC_BUILD_PIPE—

Outputs (1)

NameTypeDescription
RS_MC_BUILD_PIPERS_MC_BUILD_PIPE—