Got CustomPyanNetModel' object has no attribute 'example_output', when using dataspeech for fine-tune parler-tts?

#2
by boringtaskai - opened

I'm trying to fine tune parler-tts using your google-colab

https://colab.research.google.com/github/ylacombe/scripts_and_notebooks/blob/main/Finetuning_Parler_TTS_on_a_single_speaker_dataset.ipynb#scrollTo=eAbjfpiXZ21y

but I got error when calculate snr and reverb, using this model.

Please help

Owner

Hey, could you send more details on what you error is, the logs and how you used it ?

The error message is "AttributeError: 'PyanNet' object has no attribute 'example_output'" when creating pipeline RegressiveActivityDetectionPipeline (snr and reverb),

I found that the bug is look like in here pyannote/pyannote-audio#1620

and since brouhaha-vad is also using eniops module in the model,

class CustomActivation(nn.Module):
    ...
    def forward(self, x: torch.Tensor):
        out = list()
        for mode, activation in self.activations.items():
            _output = activation(x[mode])
            out.append(_output)

        out = torch.stack(out)
        out = rearrange(out, "n b t o -> b t (n o)")   # this is cause error in pyannote.audio == 3.2.0 (the requirements.txt file doesn't mention the version of pyannote.audio, the default will install the latest version, and cause error)
        return out

the solution is changing the rearrange() with torch.permute(), or using pyannote.audio == 3.0.0 (but we have to downgrade all torch, cudnn, etc... to be compatible with pyannote.audio 3.0.0) πŸ™

Hey everyone, the issue is coming from the library brouhaha and I've opened a PR to correct it here.
In the meantime, a quick fix would be to install an older Pyannote version like this:
pip install -U pyannote.audio==3.1.1
It should fix the issue, let me know if it works!

Sign up or log in to comment