-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'GaussianDiffusion' object has no attribute 'cond' when training with multi-GPU #18
Comments
Encountered the same issue |
@iooops any progress? |
@WillQuCD do you train the naive model? any ways to solve it? |
@yyh565655555 yes, I train the naive model. The error only happens during the validation phase. |
@WillQuCD Hi, I encountered the same issue, how to skip validation? |
the problem is using more than one gpu to run this code,just choose one gpu or add nn.dataparallel in the code
…---- Replied Message ----
From liao-h-c ***@***.***> Date 09/14/2023 22:00 To keonlee9420/DiffGAN-TTS ***@***.***> Cc ***@***.***>,
Mention ***@***.***> Subject Re: [keonlee9420/DiffGAN-TTS] 'GaussianDiffusion' object has no attribute 'cond' when training with multi-GPU (Issue #18)
@WillQuCD Hi, I encountered the same issue, how to skip validation?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Thank you for your response,where should it be added in the code?This is very important to me, and I'm eagerly looking forward to your reply. Thank you. |
Has anyone solved it? What should be done |
File "train.py", line 320, in 3.24s/it]
main(args, configs)
File "train.py", line 196, in main
figs, wav_reconstruction, wav_prediction, tag = synth_one_sample(
File "/data/workspace/liukaiyang/TTS/DiffGAN-TTS-main/utils/tools.py", line 227, in synth_one_sample
mels = [mel_pred[0, :mel_len].float().detach().transpose(0, 1) for mel_pred in diffusion.sampling()]
File "/root/anaconda3/envs/LKYBase/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 28, in decorate_context
return func(*args, **kwargs)
File "/data/workspace/liukaiyang/TTS/DiffGAN-TTS-main/model/diffusion.py", line 157, in sampling
b, *_, device = *self.cond.shape, self.cond.device
File "/root/anaconda3/envs/LKYBase/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1177, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'GaussianDiffusion' object has no attribute 'cond'
Hi,
thank you very much for your great work!
the model runs well on single GPU but encounters the above problem when training with multi-GPU.
This problem only arises in the val phase, since the sampleling() requires the cond parameter, but self.cond is not defined in the val phase.
The issue was reported in the previous issue, but without any solutions.
Could you please give some hints?
The text was updated successfully, but these errors were encountered: