ASG Models commited on
Commit
2d7efb5
1 Parent(s): 2e8f960

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -11,7 +11,12 @@ genai.configure(api_key=api_key)
11
  tokenizer = AutoTokenizer.from_pretrained("asg2024/vits-ar-sa-huba",token=token)
12
  #device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
13
  model_vits=VitsModel.from_pretrained("asg2024/vits-ar-sa-huba",token=token)#.to(device)
14
-
 
 
 
 
 
15
 
16
  generation_config = {
17
  "temperature": 1,
 
11
  tokenizer = AutoTokenizer.from_pretrained("asg2024/vits-ar-sa-huba",token=token)
12
  #device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
13
  model_vits=VitsModel.from_pretrained("asg2024/vits-ar-sa-huba",token=token)#.to(device)
14
+ model_vits.decoder.apply_weight_norm()
15
+ # torch.nn.utils.weight_norm(self.decoder.conv_pre)
16
+ # torch.nn.utils.weight_norm(self.decoder.conv_post)
17
+ for flow in model_vits.flow.flows:
18
+ torch.nn.utils.weight_norm(flow.conv_pre)
19
+ torch.nn.utils.weight_norm(flow.conv_post)
20
 
21
  generation_config = {
22
  "temperature": 1,