Closed ChaiByte closed 2 years ago
@Asthestarsfalll pesser‘s repo shows how to do the conversion from tf to torch in convert.py. But it's inference steps are not verified. Actually, This model is the source code I refer to and asymmetric padding is not used there. And I do not find asymmetric padding logic in Ho's implementation(tensorflow).
It's so confusing. Can you understand the author's reason for doing this?
You are right. In Tensorflow design, Conv2d's padding behavior is different. I will fix it soon.
Fixed in ddpm model.
I'm willing to upload my convert codes, but it doesn't work well after converting. The error between megengine and pytorch implementation are high with the same input. Because of the padding of convolution in Downsample are different, which in pytorch implementation it uses asymmetric padding. Atfter I modified the megengine implmetation, the result:
Btw, I'm also a beginner in ddpm, your blog helps me a lot!
Originally posted by @Asthestarsfalll in https://github.com/MegEngine/MegDiffusion/issues/5#issuecomment-1193254961