Nodes/NKD Klein Tools/😺NKD Klein Reference Region
ComfyUI Node

😺NKD Klein Reference Region

EXPERIMENTAL — directs ONE reference image to a specific ZONE of the canvas. Paint a mask for the zone, pick which reference it applies to, and that reference's influence is confined to the zone (and optionally strengthened inside it). Works by biasing the attention between the canvas and that reference, so it's independent of resolution. Chain one node per region/reference. Put it on the model line between Presampling and your sampler.

By Nekodificador·Created 4 months ago·Updated 27 days ago· 71
😺NKD Klein Reference Region
  • model
  • latent
  • mask
  • model
  • latent
reference_index1
region_weight1.00
outside_suppression1.00
region_hardness0.00
Category😺NKD Nodes/Klein

Inputs (7)

NameTypeDefaultDescription
modelMODEL
latentLATENTThe canvas latent from Presampling — used to map your mask onto the model's token grid. Connect Presampling's latent output here.
maskMASKThe zone this reference should fill. White = the reference applies here; black = it's kept out.
reference_indexINT10–7Which reference to confine to the zone. 0 = the main reference (ref_0), 1 = ref_1, … in the order added. Usually a secondary reference (1+).
region_weightFLOAT1.000–4How strongly the reference shows up INSIDE the zone. 1.0 = normal, above 1 reinforces (up to 4), below 1 dilutes it even inside the zone. Note: pushing this high can make the reference bleed into neighbouring areas — use region_hardness to tighten the zone instead.
outside_suppressionFLOAT1.000–1How much the reference is held back OUTSIDE the zone. 1.0 = it appears only inside the zone; 0.0 = no regional restriction (acts everywhere, like a normal reference). In between fades the restriction.
region_hardnessFLOAT0.000–1Crispness of the zone edge. 0.0 = soft falloff (follows your mask's blur — natural blend, but the reference can halo just outside the zone). 1.0 = hard binary edge (tightest containment; the boundary snaps to the token grid so it may look slightly stepped). Raise this if the reference bleeds into areas you didn't mask.

Outputs (2)

NameTypeDescription
modelMODEL
latentLATENTThe same latent, passed through — chain it into the next Reference Region to drive several regions.