A developer has introduced the ComfyUI-PixelDriftFix custom node, designed to eliminate geometric distortions and shifts when using AI models for image editing and upscaling tasks.

What Happened

A new tool, ComfyUI-PixelDriftFix, has been released, which automatically aligns the geometry and size of the output image with the original. The node offers two operating modes: a fast flat_4_points mode, which uses homography to align planes (taking approximately 4 seconds), and an experimental mesh mode for correcting more complex, non-linear deformations.

Context

The "pixel drift" problem is systemic to modern generative models such as Flux2-Dev, Qwen-Edit, or Klein. When performing img2img or upscaling tasks, these models often change the composition or the size of the output tensor relative to the input, leading to loss of precision and edge shifting.

Why It Matters for the Industry

The tool allows for the stabilization of generative workflows, making them suitable for creating high-precision and consistent AI pipelines. This simplifies the integration of modern models into professional processes that require strict preservation of the original composition and increases the reliability of automated editing chains.

Why It Matters for Users

ComfyUI users can avoid visual artifacts and "shifted" edges when editing photographs. The tool ensures a perfect match between the modified image and the original, eliminating the need for manual geometric correction after generation.

What Is Not Yet Known / Limitations

The experimental mesh mode currently suffers from low accuracy and high computational complexity. For the basic algorithm to work correctly, a minimum of 10 common keypoints between images is required. Additionally, there is noted difficulty in implementing the solution in corporate environments due to the specifics of ComfyUI and the lack of enterprise-level management tools.

Sources

Author

Look at AI, Editorial Team