Nodes/ComfyUI-AusBoss/Realign to Source (EXPERIMENTAL πŸ§ͺ) πŸ†Ž
ComfyUI Node

Realign to Source (EXPERIMENTAL πŸ§ͺ) πŸ†Ž

EXPERIMENTAL. Lines an edited picture back up with the original. Qwen Image 2.1 often draws an edit slightly zoomed in or shifted, especially style changes like watercolor or anime, so the edit no longer sits on top of the original. This node measures how far it moved and moves it back. Best result: pad the picture with Load Image + Pad before editing and plug its stitcher in here, so the edit has room to move and you get real picture all the way to the edges.

By ausbossΒ·Created 2 months agoΒ·Updated about 7 hours agoΒ· 6
Realign to Source (EXPERIMENTAL πŸ§ͺ) πŸ†Ž
  • edited
  • source
  • stitcher
  • image
  • empty_mask
  • report
β—„fitzoom + shiftβ–Ί
β—„empty_filledgeβ–Ί
β—„max_zoom20.0β–Ί
CategoryπŸ†Ž AusBoss/Image

Inputs (6)

NameTypeDefaultDescription
editedIMAGEThe edited picture.
sourceIMAGEThe original picture you edited, at the size the edit model saw it. The result comes out at this size.
fitCOMBOzoom + shiftzoom + shift fixes the usual Qwen drift. affine also fixes a slight tilt.
empty_fillCOMBOedgeIf the edit slid past the edge, a thin strip ends up with nothing in it. edge stretches the nearest pixels into it, source fills it from the original, gray fills it flat gray for inpainting.
max_zoomFLOAT20.01–50The biggest zoom it will undo, in percent. Anything bigger is treated as a change you meant and left alone.
stitcheroptAUSBOSS_STITCHEROptional. Plug in the stitcher from Load Image + Pad πŸ†Ž if you padded the picture before editing. You get your picture back without the padding, with no empty edges.

Outputs (3)

NameTypeDescription
imageIMAGEThe edit, lined up with the original and at its size.
empty_maskMASKWhite where the lined-up edit has nothing (a strip that slid off the edge). All black when there is none.
reportSTRINGHow far the edit had moved and what was done. Plug it into Show Text πŸ†Ž to read it.