Closed bobqywei closed 1 year ago
I've confirmed that the decoder does in fact create an 8px padding on the top left which is incorrect:
https://colab.research.google.com/drive/1XR7Rs-mLZBeQI3_9c7p3lr_LJ65bJjJD?usp=sharing
more info at https://github.com/keras-team/keras-cv/issues/1158
Notes for Ian/Francois/Myself:
Re-opening as I rolled back the fix, which caused a separate issue with inpainting.
This was found when debugging: https://github.com/keras-team/keras-cv/issues/1158 and is likely the root cause.
The pretrained image encoder adds zero padding to the top and left edges of the image when encoding. This can be reproduced and seen as follows:
The original image is transformed via
out = decoder(encoder(img))
resulting in an output image that is visually identical other than the gray border at the top and left edges. Furthermore, we can likely assume that there's no problem with the decoder since that is being used in the standardStableDiffusion.text_to_image
function which does not have this issue visually.