deep-floyd / IF

Other
7.63k stars 495 forks source link

Resize the support noise and inpainting mask to match the image size #125

Open pierrot-lc opened 1 year ago

pierrot-lc commented 1 year ago

When performing inpainting, if the provided image does not have a suitable aspect ratio that aligns with the multiple stages of the IF, the support noise and inpainting mask end up having incompatible shapes with the generated image. As a result, the assertion in base.py is triggered: assert support_noise.shape == (1, 3, image_h, image_w).

This PR offers a solution by resizing the support noise and inpainting mask appropriately to ensure their compatibility with the generated image size.