lquesada / ComfyUI-Inpaint-CropAndStitch

ComfyUI nodes to crop before sampling and stitch back after sampling that speed up inpainting
GNU General Public License v3.0
398 stars 23 forks source link

Bug in the Extend Image for Outpainting node #22

Closed xuzifeung closed 5 months ago

xuzifeung commented 5 months ago

I have found a bug in the Extend Image for Outpainting node. When both vertical and horizontal extensions are applied simultaneously, meaning when expanduppixels/expanddownpixels/expandleftpixels/expandrightpixels are all non-zero, or when expandupfactor/expanddownfactor/expandleftfactor/expandrightfactor are all greater than 1, the masks generated by the Inpaint Crop node will have issues. Specifically, it will turn the entire image into a non-masked area (turn white), as shown in the image below. example

xuzifeung commented 5 months ago

The cause of the problem may be that the boundary conditions are not handled correctly when expanding the image, resulting in problems with the generated mask. Specifically, when expanding an image horizontally and vertically at the same time, the expanded area may exceed the original image boundary, so the boundary needs to be handled correctly when generating the mask.

lquesada commented 5 months ago

Mmm disable fill mask holes in the crop node

On Thu, 4 Jul 2024, 05:50 Feungzzz, @.***> wrote:

The cause of the problem may be that the boundary conditions are not handled correctly when expanding the image, resulting in problems with the generated mask. Specifically, when expanding an image horizontally and vertically at the same time, the expanded area may exceed the original image boundary, so the boundary needs to be handled correctly when generating the mask.

— Reply to this email directly, view it on GitHub https://github.com/lquesada/ComfyUI-Inpaint-CropAndStitch/issues/22#issuecomment-2208071414, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCKTXJLDE7WOZ75NEVMHITZKTBARAVCNFSM6AAAAABKKWPRAWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBYGA3TCNBRGQ . You are receiving this because you are subscribed to this thread.Message ID: @.*** com>

xuzifeung commented 5 months ago

it works, thank you.