Nodes/NKD Klein Tools/😺NKD Klein Postsampling
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.

By Nekodificador·Created 4 months ago·Updated 27 days ago· 71
😺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)

NameTypeDefaultDescription
imageIMAGEThe image coming out of your sampler chain.
bundleNKD_KLEIN_BUNDLEComes from NKD Klein Presampling. Carries everything this node needs to assemble the final image.
uncrop_featherINT100–256How 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_colorsFLOAT0.000–1Pulls 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_edgesBOOLEANfalseUses 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_regionBOOLEANfalseWhen 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_softnessFLOAT2.000–10How 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_paddingFLOAT0.0-3–3Grows 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_gapsBOOLEANfalseFills 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_bordersBOOLEANtrueExtrapolates 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)

NameTypeDescription
imageIMAGE
debug_differenceIMAGEA 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.