ComfyUI Node
😺NKD Klein Reference Fit
EXPERIMENTAL — scales a reference image to fit a mask's region and places it there on a canvas-sized image. Use it so the WHOLE reference lands inside the zone you mask, instead of only the slice that happens to overlap it. Wire: reference image → this node (with your mask) → the reference slot of Presampling. Use the SAME mask in the Reference Region node.
😺NKD Klein Reference Fit
- image
- mask
- image
◄fitcontain►
◄padding0►
◄backgroundgray►
Category😺NKD Nodes/Klein
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | The reference image to place inside the masked region. | |
| mask | MASK | The zone to place the reference in. Its bounding box sets the position and size; its resolution sets the canvas size. Use the same mask as the Reference Region node. | |
| fit | COMBO | contain | contain: scale the whole reference to fit inside the zone (keeps its proportions, may leave a neutral border). stretch: fill the zone exactly (may distort). |
| padding | INT | 00–512 | Grow the bounding box by this many pixels before placing. |
| background | COMBO | gray | What fills the area around the placed reference. Gray is neutral. Mostly irrelevant outside the zone (the Region node suppresses it there), but it shows in any border inside the zone when using 'contain'. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | Canvas-sized image with the reference placed in the zone. Feed into Presampling's reference slot. |