keonlee9420 / DiffGAN-TTS

PyTorch Implementation of DiffGAN-TTS: High-Fidelity and Efficient Text-to-Speech with Denoising Diffusion GANs
MIT License
320 stars 44 forks source link

ERROR #1

Closed FlyToYourMooN closed 2 years ago

FlyToYourMooN commented 2 years ago

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 decoratecontext 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'

Thank for your work!I seem to get a Error……

FlyToYourMooN commented 2 years ago

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, is this a bug?

keonlee9420 commented 2 years ago

Hi @Biqigubafan , sorry but I cannot reproduce this error. In my running, there was no issue on val sampling. Could you please make sure that you used the latest version of the code? There have been some updates in the repo without leaving the commit logs (I initialized all things as it's just born).

FlyToYourMooN commented 2 years ago
捕获1 捕获
FlyToYourMooN commented 2 years ago

Hello! I downloaded your code on Sunday. I found that in the val stage of “shallow”, called diffusion.sampling(), but sampling() needs to use “cond”. Since self.cond is defined in forward, at this time diffusion.sampling () does not run forward, so “cond” will show undefined, which is my guess, and I don't understand it very well, but I added the cond parameter to sampling() and changed the relevant parts, it can run normally. Maybe I have encountered some very special bugs... Anyway, thank you very much for your work! This code is very helpful to me, I want to improve the Baseline and help me graduate!

keonlee9420 commented 2 years ago

I see. Did you follow the steps in README? You're supposed to train 'shallow' model after training 'aux' model, so that the 'shallow' model can leverage the pre-trained 'aux' model during its training.

FlyToYourMooN commented 2 years ago

I follow the steps try again,thanks!

The-Water commented 1 year ago

我按照步骤再试一次,谢谢! Hi, I have the same problem as you, I want to know how you modified the code, thank you very much!

yyh565655555 commented 1 year ago

Hello! I downloaded your code on Sunday. I found that in the val stage of “shallow”, called diffusion.sampling(), but sampling() needs to use “cond”. Since self.cond is defined in forward, at this time diffusion.sampling () does not run forward, so “cond” will show undefined, which is my guess, and I don't understand it very well, but I added the cond parameter to sampling() and changed the relevant parts, it can run normally. Maybe I have encountered some very special bugs... Anyway, thank you very much for your work! This code is very helpful to me, I want to improve the Baseline and help me graduate!

hi , i also met the problem when i train naive, may you tell me how to modify the code? 3q

wangxuanji commented 8 months ago

Have you solved it? Can you share the code you modified? This is really important to me. As a novice, it's really difficult for me

wangxuanji commented 8 months ago

你好!我在星期天下载了你的代码。我发现在“shallow”的 val 阶段,称为 diffusion.sampling(),但 sampling() 需要使用“cond”。由于self.cond是向前定义的,此时diffusion.sampleing()不会向前运行,所以“cond”会显示undefined,这是我的猜测,我不太了解,但是我在sampling()中添加了cond参数并更改了相关部分,它可以正常运行。也许我遇到了一些非常特殊的错误......无论如何,非常感谢您的工作!这个代码对我很有帮助,我想改进基线,帮助我毕业!

嗨,我在训练幼稚的时候也遇到了问题,你能告诉我如何修改代码吗?3Q

您解决了吗,怎么解决的可以分享一下吗

FlyToYourMooN commented 8 months ago

你好!我在星期天下载了你的代码。我发现在“shallow”的 val 阶段,称为 diffusion.sampling(),但 sampling() 需要使用“cond”。由于self.cond是向前定义的,此时diffusion.sampleing()不会向前运行,所以“cond”会显示undefined,这是我的猜测,我不太了解,但是我在sampling()中添加了cond参数并更改了相关部分,它可以正常运行。也许我遇到了一些非常特殊的错误......无论如何,非常感谢您的工作!这个代码对我很有帮助,我想改进基线,帮助我毕业!

嗨,我在训练幼稚的时候也遇到了问题,你能告诉我如何修改代码吗?3Q

您解决了吗,怎么解决的可以分享一下吗

时间太过久远我忘记了,不过确实成功运行了,好像是一层层把这个参数改了还是去掉,我再看看

wangxuanji commented 8 months ago

你好!我在星期天下载了你的代码。我发现在“shallow”的 val 阶段,称为 diffusion.sampling(),但 sampling() 需要使用“cond”。由于self.cond是向前定义的,此时diffusion.sampleing()不会向前运行,所以“cond”会显示undefined,这是我的猜测,我不太了解,但是我在sampling()中添加了cond参数并更改了相关部分,它可以正常运行。也许我遇到了一些非常特殊的错误......无论如何,非常感谢您的工作!这个代码对我很有帮助,我想改进基线,帮助我毕业!

嗨,我在训练幼稚的时候也遇到了问题,你能告诉我如何修改代码吗?3Q

您解决了吗,怎么解决的可以分享一下吗

时间太过久远我忘记了,不过确实成功运行了,好像是一层层把这个参数改了还是去掉,我再看看

非常感谢您!我刚开始接触这些,很多东西没有人问和交流,这对我来说实在困难

FlyToYourMooN commented 8 months ago

请加我的联系方式,qq97557509

---Original--- From: @.> Date: Thu, Mar 7, 2024 22:21 PM To: @.>; Cc: @.>;"State @.>; Subject: Re: [keonlee9420/DiffGAN-TTS] ERROR (Issue #1)

你好!我在星期天下载了你的代码。我发现在“shallow”的 val 阶段,称为 diffusion.sampling(),但 sampling() 需要使用“cond”。由于self.cond是向前定义的,此时diffusion.sampleing()不会向前运行,所以“cond”会显示undefined,这是我的猜测,我不太了解,但是我在sampling()中添加了cond参数并更改了相关部分,它可以正常运行。也许我遇到了一些非常特殊的错误......无论如何,非常感谢您的工作!这个代码对我很有帮助,我想改进基线,帮助我毕业!

嗨,我在训练幼稚的时候也遇到了问题,你能告诉我如何修改代码吗?3Q

您解决了吗,怎么解决的可以分享一下吗

时间太过久远我忘记了,不过确实成功运行了,好像是一层层把这个参数改了还是去掉,我再看看

非常感谢您!我刚开始接触这些,很多东西没有人问和交流,这对我来说实在困难

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>