divamgupta / stable-diffusion-tensorflow

Stable Diffusion in TensorFlow / Keras
Other
1.57k stars 227 forks source link

Passing image through encoder and decoder yields shifted result #41

Closed Lime-Cakes closed 1 year ago

Lime-Cakes commented 1 year ago

After passing an image into encoder and straight to decoder, the image is shifted slightly. This seemed to happen at various different size.

Here's a basic colab to reproduce the weird result. It's edited from img2img notebook linked on readme. https://colab.research.google.com/drive/1lwCF5vdys5U4u9skE_DFrK8ecUP8Pmnm?usp=sharing

Lime-Cakes commented 1 year ago

I believed I have found the problem. Encoder adds extra padding at certain layers. I'll create a pull request ASAP

divamgupta commented 1 year ago

Great. Looking fwd to your PR!