From 2ec093da410235f32f6a70df168456db174af714 Mon Sep 17 00:00:00 2001 From: Florian Lux Date: Thu, 17 Oct 2024 23:36:14 +0200 Subject: [PATCH] make speaker embedding fully optional again --- Modules/ToucanTTS/dit_wrapper.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Modules/ToucanTTS/dit_wrapper.py b/Modules/ToucanTTS/dit_wrapper.py index 762939dde..870c51bd9 100644 --- a/Modules/ToucanTTS/dit_wrapper.py +++ b/Modules/ToucanTTS/dit_wrapper.py @@ -19,6 +19,8 @@ class DitWrapper(nn.Module): def __init__(self, hidden_channels, out_channels, filter_channels, num_heads, kernel_size=3, p_dropout=0.1, gin_channels=0, time_channels=0): super().__init__() + if gin_channels is None: + gin_channels = 0 self.time_fusion = FiLMLayer(hidden_channels, out_channels, time_channels) self.conv1 = ConvNeXtBlock(hidden_channels, out_channels, filter_channels, gin_channels) self.conv2 = ConvNeXtBlock(hidden_channels, out_channels, filter_channels, gin_channels)