Skip to content
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

Support for pytorch v0.4 #77

Closed
r9y9 opened this issue Apr 26, 2018 · 8 comments
Closed

Support for pytorch v0.4 #77

r9y9 opened this issue Apr 26, 2018 · 8 comments
Labels

Comments

@r9y9
Copy link
Owner

r9y9 commented Apr 26, 2018

No description provided.

@r9y9 r9y9 added the torch label Apr 26, 2018
r9y9 added a commit that referenced this issue Apr 27, 2018
@engiecat
Copy link
Contributor

There seems to be an error caused by new changes.
When I trigger synthesis, the following error occurs

Traceback (most recent call last):
  File "synthesis.py", line 144, in <module>
    model, text, p=replace_pronunciation_prob, speaker_id=speaker_id, fast=True)
  File "synthesis.py", line 67, in tts
    sequence, text_positions=text_positions, speaker_ids=speaker_ids)
  File "H:\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 491, in __call__
    result = self.forward(*input, **kwargs)
  File "H:\Tensorflow_Study\git\dv3_torch04\deepvoice3_pytorch\__init__.py", line 79, in forward
    text_positions, frame_positions, input_lengths)
  File "H:\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 491, in __call__
    result = self.forward(*input, **kwargs)
  File "H:\Tensorflow_Study\git\dv3_torch04\deepvoice3_pytorch\__init__.py", line 124, in forward
    speaker_embed=speaker_embed, lengths=input_lengths)
  File "H:\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 491, in __call__
    result = self.forward(*input, **kwargs)
  File "H:\Tensorflow_Study\git\dv3_torch04\deepvoice3_pytorch\deepvoice3.py", line 284, in forward
    outputs = self.incremental_forward(encoder_out, text_positions, speaker_embed)
  File "H:\Tensorflow_Study\git\dv3_torch04\deepvoice3_pytorch\deepvoice3.py", line 420, in incremental_forward
    x = f.incremental_forward(x, speaker_embed)
  File "H:\Tensorflow_Study\git\dv3_torch04\deepvoice3_pytorch\modules.py", line 143, in incremental_forward
    return self._forward(x, speaker_embed, True)
  File "H:\Tensorflow_Study\git\dv3_torch04\deepvoice3_pytorch\modules.py", line 150, in _forward
    x = self.conv.incremental_forward(x)
  File "H:\Tensorflow_Study\git\dv3_torch04\deepvoice3_pytorch\conv.py", line 43, in incremental_forward
    input = torch.Tensor(self.input_buffer)
TypeError: expected torch.FloatTensor (got torch.cuda.FloatTensor)

For now, I had created a quick fix by changing line43 of conv.py to
input = torch.Tensor(self.input_buffer.cpu()).cuda()
but I think that this will cause performance drop.

@r9y9
Copy link
Owner Author

r9y9 commented Apr 28, 2018

Thanks for the report. I will look into it.

r9y9 added a commit that referenced this issue Apr 28, 2018
@r9y9
Copy link
Owner Author

r9y9 commented Apr 28, 2018

Fixed in 7b6f82f

@r9y9
Copy link
Owner Author

r9y9 commented May 1, 2018

Turn out that after fixing for pytorch v0.4, I cannot get reasonable speech quality. Not sure what is the problem yet, I should look into it closely..,

@r9y9
Copy link
Owner Author

r9y9 commented May 1, 2018

For the record, 7907592 with deepvoice3_ljspeech preset works

@engiecat
Copy link
Contributor

engiecat commented May 1, 2018

just confirmed that at least synthesis.py works equally between pytorch 0.3 version and current version.
(Same checkpoint file, same text -> same output audio)

@r9y9
Copy link
Owner Author

r9y9 commented May 1, 2018

Thanks for letting me know. Yes I mean training deepvoice3 doesn't work anymore.

@r9y9
Copy link
Owner Author

r9y9 commented May 4, 2018

As for the issue I previously mentioned was actually a problem of eval_model in train.py. There's no issue for synthesis as you said. Fixed by ec4cf2a, not sure what's actually the problem is. It's hard to debug so for now I changed the args of tts function as same as synthesis.py; i.e., fast=True.

@r9y9 r9y9 closed this as completed in #82 May 4, 2018
engiecat pushed a commit to engiecat/deepvoice3_pytorch that referenced this issue May 5, 2018
engiecat pushed a commit to engiecat/deepvoice3_pytorch that referenced this issue May 5, 2018
engiecat pushed a commit to engiecat/deepvoice3_pytorch that referenced this issue May 5, 2018
engiecat pushed a commit to engiecat/deepvoice3_pytorch that referenced this issue May 5, 2018
engiecat pushed a commit to engiecat/deepvoice3_pytorch that referenced this issue May 5, 2018
engiecat pushed a commit to engiecat/deepvoice3_pytorch that referenced this issue May 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants