Zhendong-Wang / Diffusion-GAN

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

diffusion.py #19

Open ghost opened 1 year ago

ghost commented 1 year ago

I am interested in your work, but I have difficulty designing a diffusion plugin for my own GAN, do you have a simple diffusion plugin for reference

Zhendong-Wang commented 1 year ago

We provide detailed steps for Simple Plugin with Diffusion-GAN in https://github.com/Zhendong-Wang/Diffusion-GAN#simple-plug-in. Generally there is only three steps. 1. prepare diffusion.py . 2. use diffuion.py to augment the inputs for discriminator. 3. udpate Diffusion after each iteration.

diffusion.py could be found here, https://github.com/Zhendong-Wang/Diffusion-GAN/blob/main/diffusion-stylegan2/training/diffusion.py.

ghost commented 1 year ago

adjust = np.sign(sign(Discriminator(real_images)) - ada_target) * C ada_target how to get it

someonegirl commented 1 year ago

Excuse me, did you modify it successfully? I also want to try to modify my code. If you succeed, can you tell me how you did it?