tori29umai0123/comfyui-qwenimageedit-lockpixel — explained in plain English
Analysis updated 2026-05-18
Edit an image with Qwen-Image-Edit without introducing pixel drift or zoom-like misalignment.
Extract line art or retouch part of an image while keeping the rest perfectly in place.
Edit individual manga panels where layout alignment with the original matters.
| tori29umai0123/comfyui-qwenimageedit-lockpixel | 1038lab/comfyui-agnes-ai | andyuneducated/resolve-ai | |
|---|---|---|---|
| Stars | 18 | 18 | 18 |
| Language | Python | Python | Python |
| Setup difficulty | moderate | easy | hard |
| Complexity | 3/5 | 2/5 | 4/5 |
| Audience | vibe coder | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires an existing ComfyUI installation with Qwen-Image-Edit set up, drop the folder into custom_nodes and restart.
LockPixel is a small add-on pack of custom nodes for ComfyUI, a visual tool for building AI image generation workflows. It targets a specific problem with Qwen-Image-Edit, an AI model that edits images: small pixel shifts, drift, or a subtle zoom-like distortion that can appear between the original image and the edited output. The cause, as the README explains, is that the internal representation used for the reference image and the one used for generating the edited output are sometimes built at different sizes, which throws off alignment. LockPixel fixes this by padding the input image out to a size divisible by 32 pixels, converting that padded image into its internal representation only once, and reusing that same representation for both the reference and the generation step, instead of letting them drift apart. The pack adds four nodes: one that pads an image without resizing it, one that creates the Qwen conditioning and generation input from that padded image together, one that lets an existing result be reused as a reference, and one that crops the padding back off after the image is generated. The README includes a diagram of the intended node connections and an example workflow file to import directly into ComfyUI. This is useful for tasks where keeping the rest of the image exactly in place matters, such as line art extraction, retouching, partial edits, or editing individual manga panels. The README is honest that this fix does not guarantee pixel perfect results in untouched areas, since the encoding and decoding process itself is not perfectly reversible, and suggests compositing the edited region back over the original image with a mask for strict preservation. Installation means placing the folder into ComfyUI's custom_nodes directory and restarting. The project is released under the MIT license.
A ComfyUI node pack that fixes pixel drift and misalignment when editing images with the Qwen-Image-Edit AI model.
Mainly Python. The stack also includes Python, ComfyUI, Qwen-Image-Edit.
MIT license: use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly vibe coder.
This repo across BitVibe Labs
Don't trust strangers blindly. Verify against the repo.