ComfyUI Node
😺NKD Klein Postsampling
The other half of the Klein workflow. Pair it with NKD Klein Presampling — connect your sampler's image output here, plus the bundle from the start of the chain, and this node delivers the final image ready to use.
😺NKD Klein Postsampling
- image
- bundle
- image
- debug_difference
◄uncrop_feather10►
◄match_original_colors0.00►
◄seamless_edgesfalse►
◄auto_detect_edit_regionfalse►
◄edge_softness2.00►
◄region_padding0.0►
◄fill_inner_gapsfalse►
◄extend_to_borderstrue►
Category😺NKD Nodes/Klein
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | The image coming out of your sampler chain. | |
| bundle | NKD_KLEIN_BUNDLE | Comes from NKD Klein Presampling. Carries everything this node needs to assemble the final image. | |
| uncrop_feather | INT | 100–256 | How softly the regenerated zone blends back into the original image. Higher values give a more gradual transition; lower values keep the edge crisp. |
| match_original_colors | FLOAT | 0.000–1 | Pulls the regenerated area's colors and lighting back toward the original image. The model often shifts the overall white balance or saturation slightly — this corrects that drift so the composite looks like it belongs to the same scene. 0 leaves the colors as the model produced them; 1 fully matches them to the original. Statistics are read only from the unchanged background, so the edit itself keeps the colors it was supposed to have. |
| seamless_edges | BOOLEAN | false | Uses Poisson blending to mathematically erase any remaining color or lighting seam at the edge of the regenerated zone. Turn this on when the boundary is still visible after color matching — usually on dramatic relighting or strong style changes. Heavier than a normal blend and can introduce smearing on textured edges, so leave it off by default. |
| auto_detect_edit_region | BOOLEAN | false | When you run an edit without giving a mask, this turns on automatic detection of what actually changed between your input and the generated image, and composites only that region back. Keeps the unchanged parts of the original pixel-perfect across multiple iterative edits, instead of letting the model rewrite the whole canvas every time. Only used when there is an input image but no mask — ignored otherwise. |
| edge_softness | FLOAT | 2.000–10 | How softly the auto-detected region fades into the original. Expressed as a percentage of the image diagonal, so the same value looks the same at any resolution. Higher values give a wider, gentler transition (good for skin, fabric, hair); lower values keep the edge tight (good for geometric edits). Only used when Auto-Detect Edit Region is on. |
| region_padding | FLOAT | 0.0-3–3 | Grows or shrinks the auto-detected region before blending. Positive values expand outward — handy when the detection falls just short of the true edges. Negative values pull the region inward — handy when it bleeds into background that should stay untouched. Expressed as a percentage of the image diagonal. Only used when Auto-Detect Edit Region is on. |
| fill_inner_gaps | BOOLEAN | false | Fills small holes inside the auto-detected region. When the edit changed an object's color or texture but not its interior contrast, detection can leave little voids in the middle. Turn this on to seal them so the whole object gets composited cleanly. Only used when Auto-Detect Edit Region is on. |
| extend_to_borders | BOOLEAN | true | Extrapolates the auto-detected region into any border void the alignment step leaves behind. Without this, a thin frame of the original can peek through around the edge of the regenerated zone. Leave on unless you see mirrored artifacts at the image border. Only used when Auto-Detect Edit Region is on. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| debug_difference | IMAGE | A debug view that exaggerates the difference between the result and the original. Connect it to a Preview Image to spot where things changed and check the edges look clean. Not needed for normal use. |