Zhendong-Wang / Diffusion-GAN

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

AssertionError: Default process group is not initialized #21

Open 1234yyy1234 opened 1 year ago

1234yyy1234 commented 1 year ago

raceback (most recent call last): File "train.py", line 603, in main() # pylint: disable=no-value-for-parameter File "E:\anconda3\envs\diffusionGAN\lib\site-packages\click\core.py", line 1130, in call return self.main(args, kwargs) File "E:\anconda3\envs\diffusionGAN\lib\site-packages\click\core.py", line 1055, in main rv = self.invoke(ctx) File "E:\anconda3\envs\diffusionGAN\lib\site-packages\click\core.py", line 1404, in invoke return ctx.invoke(self.callback, ctx.params) File "E:\anconda3\envs\diffusionGAN\lib\site-packages\click\core.py", line 760, in invoke return __callback(args, kwargs) File "E:\anconda3\envs\diffusionGAN\lib\site-packages\click\decorators.py", line 26, in new_func return f(get_current_context(), *args, kwargs) File "train.py", line 596, in main subprocess_fn(rank=0, args=args, temp_dir=temp_dir) File "train.py", line 422, in subprocess_fn training_loop.training_loop(rank=rank, args) File "E:\Python\Diffusion-GAN-main\diffusion-insgen\training\training_loop.py", line 351, in training_loop loss.accumulate_gradients(phase=phase.name, real_img=real_img, real_c=real_c, gen_z=gen_z, gen_c=gen_c, sync=sync, gain=gain, cl_phases=cl_phases, D_ema=D_ema, g_fake_cl=not no_cl_on_g, cl_loss_weight) File "E:\Python\Diffusion-GAN-main\diffusion-insgen\training\contrastive_loss.py", line 162, in accumulate_gradients loss_Dreal = loss_Dreal + lw_real_cl self.run_cl(real_img_tmp, real_c, sync, Dphase.module, D_ema, loss_name='D_cl') File "E:\Python\Diffusion-GAN-main\diffusion-insgen\training\contrastive_loss.py", line 77, in run_cl loss = contrastive_head(logits0, logits1, loss_only=loss_only, update_q=update_q) File "E:\anconda3\envs\diffusionGAN\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl result = self.forward(input, kwargs) File "E:\Python\Diffusion-GAN-main\diffusion-insgen\training\contrastive_head.py", line 183, in forward self._dequeue_and_enqueue(k) File "E:\anconda3\envs\diffusionGAN\lib\site-packages\torch\autograd\grad_mode.py", line 26, in decorate_context return func(*args, kwargs) File "E:\Python\Diffusion-GAN-main\diffusion-insgen\training\contrastive_head.py", line 51, in _dequeue_and_enqueue keys = concat_all_gather(keys) File "E:\anconda3\envs\diffusionGAN\lib\site-packages\torch\autograd\grad_mode.py", line 26, in decorate_context return func(*args, **kwargs) File "E:\Python\Diffusion-GAN-main\diffusion-insgen\training\contrastive_head.py", line 197, in concat_allgather for in range(torch.distributed.get_world_size())] File "E:\anconda3\envs\diffusionGAN\lib\site-packages\torch\distributed\distributed_c10d.py", line 638, in get_world_size return _get_group_size(group) File "E:\anconda3\envs\diffusionGAN\lib\site-packages\torch\distributed\distributed_c10d.py", line 220, in _get_group_size _check_default_pg() File "E:\anconda3\envs\diffusionGAN\lib\site-packages\torch\distributed\distributed_c10d.py", line 211, in _check_default_pg "Default process group is not initialized" AssertionError: Default process group is not initialized

Zhendong-Wang commented 1 year ago

The issue is solved here https://github.com/Zhendong-Wang/Diffusion-GAN/issues/10