Zhendong-Wang / Diffusion-GAN

Official PyTorch implementation for paper: Diffusion-GAN: Training GANs with Diffusion
MIT License
626 stars 67 forks source link

Conditioning signal in Diffusion ProjectedGAN #18

Closed yahshibu closed 1 year ago

yahshibu commented 1 year ago

Great work! Thank you for sharing your code.

I have a question about Diffusion ProjectedGAN.

In Diffusion StyleGAN2 and Diffusion InsGAN, time-step information $t$ is provided to discriminators.

https://github.com/Zhendong-Wang/Diffusion-GAN/blob/05c6b0f07b855266563dc40ee97e9eaffe379932/diffusion-stylegan2/training/networks.py#L729-L732

https://github.com/Zhendong-Wang/Diffusion-GAN/blob/05c6b0f07b855266563dc40ee97e9eaffe379932/diffusion-insgen/training/networks.py#L732-L735

On the other hand, $t$ is not given to a discriminator in Diffusion ProjectedGAN, as the paper mentions in Appendix. $t$ is just used in a feature network where feature vectors are diffused.

https://github.com/Zhendong-Wang/Diffusion-GAN/blob/05c6b0f07b855266563dc40ee97e9eaffe379932/diffusion-projected-gan/pg_modules/discriminator.py#L184

I'm wondering why a discriminator in Diffusion ProjectedGAN works well without time-step information $t$. I'd appreciated it if you would give some insights.

Best regards.

Zhendong-Wang commented 1 year ago

Hi there, thanks for your interest and sorry for the late reply. Empirically we found the discriminator in ProjectedGAN doesn't need the $t$ as the condition. The discriminator in ProjectedGAN is different from StyleGAN2, which is light-weighed. Injection of $t$ will support our Theorem 2 but sometimes without $t$ condition, the algorithm still works.

yahshibu commented 1 year ago

Thank you for your reply!

Injection of $t$ will support our Theorem 2 but sometimes without condition Yes, this is surprising to me. Now, I understand that you empirically found the algorithm works even without $t$.