tianfengping.tfp commited on
Commit
9e9ccfa
·
1 Parent(s): 758e8f9

disable jit

Browse files
Files changed (1) hide show
  1. cosyvoice_rodis/flow/flow.py +5 -0
cosyvoice_rodis/flow/flow.py CHANGED
@@ -3,6 +3,8 @@
3
  import logging
4
  import random
5
  from typing import Dict, Optional
 
 
6
  import torch
7
  import torch.nn as nn
8
  from torch.nn import functional as F
@@ -157,6 +159,9 @@ class MaskedDiffWithXvec(torch.nn.Module):
157
  token = self.input_embedding(torch.clamp(token, min=0).long()) * mask
158
 
159
  # text encode
 
 
 
160
  h, h_lengths = self.encoder(token, token_len, flow_emotion_embedding)
161
  h = self.encoder_proj(h) #torch.Size([1, 358, 80])
162
  mel_len1, mel_len2 = prompt_feat.shape[1], int(token_len2 / self.input_frame_rate * 22050 / 256)
 
3
  import logging
4
  import random
5
  from typing import Dict, Optional
6
+ import os
7
+ os.environ["TORCH_JIT_DISABLE"] = "1"
8
  import torch
9
  import torch.nn as nn
10
  from torch.nn import functional as F
 
159
  token = self.input_embedding(torch.clamp(token, min=0).long()) * mask
160
 
161
  # text encode
162
+
163
+ print("token:", token, token_len, flow_emotion_embedding)
164
+ print("token shape:", token.shape(), token_len.shape(), flow_emotion_embedding.shape())
165
  h, h_lengths = self.encoder(token, token_len, flow_emotion_embedding)
166
  h = self.encoder_proj(h) #torch.Size([1, 358, 80])
167
  mel_len1, mel_len2 = prompt_feat.shape[1], int(token_len2 / self.input_frame_rate * 22050 / 256)