BartPoint commited on
Commit
da06092
1 Parent(s): 9445938

Update app_multi.py

Browse files
Files changed (1) hide show
  1. app_multi.py +14 -18
app_multi.py CHANGED
@@ -103,28 +103,24 @@ for model_name in multi_cfg.get('models'):
103
  else:
104
  net_g = SynthesizerTrnMs768NSFsid_nono(*cpt['config'])
105
 
106
- if 'enc_p.emb_phone.weight' not in cpt['weight']:
107
-
108
- del net_g.enc_q
109
 
110
- # According to original code, this thing seems necessary.
111
- print(net_g.load_state_dict(cpt['weight'], strict=False))
112
 
113
- net_g.eval().to(config.device)
114
- net_g = net_g.half() if util.is_half(config.device) else net_g.float()
115
 
116
- vc = VC(tgt_sr, config)
117
 
118
- loaded_models.append(dict(
119
- name=model_name,
120
- metadata=model_info,
121
- vc=vc,
122
- net_g=net_g,
123
- if_f0=if_f0,
124
- target_sr=tgt_sr
125
- ))
126
- else:
127
- print("Skip one module, because is too big")
128
 
129
  print(f'Models loaded: {len(loaded_models)}')
130
 
 
103
  else:
104
  net_g = SynthesizerTrnMs768NSFsid_nono(*cpt['config'])
105
 
106
+ del net_g.enc_q
 
 
107
 
108
+ # According to original code, this thing seems necessary.
109
+ print(net_g.load_state_dict(cpt['weight'], strict=False))
110
 
111
+ net_g.eval().to(config.device)
112
+ net_g = net_g.half() if util.is_half(config.device) else net_g.float()
113
 
114
+ vc = VC(tgt_sr, config)
115
 
116
+ loaded_models.append(dict(
117
+ name=model_name,
118
+ metadata=model_info,
119
+ vc=vc,
120
+ net_g=net_g,
121
+ if_f0=if_f0,
122
+ target_sr=tgt_sr
123
+ ))
 
 
124
 
125
  print(f'Models loaded: {len(loaded_models)}')
126