Spaces:
Runtime error
Runtime error
OOPS
Browse files- app_multi.py +5 -5
app_multi.py
CHANGED
@@ -104,11 +104,11 @@ for model_name in multi_cfg.get('models'):
|
|
104 |
net_g = SynthesizerTrnMs768NSFsid_nono(*cpt['config'])
|
105 |
|
106 |
if 'enc_p.emb_phone.weight' in cpt['weight']:
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
|
113 |
del net_g.enc_q
|
114 |
|
|
|
104 |
net_g = SynthesizerTrnMs768NSFsid_nono(*cpt['config'])
|
105 |
|
106 |
if 'enc_p.emb_phone.weight' in cpt['weight']:
|
107 |
+
old_shape = cpt['weight']['enc_p.emb_phone.weight'].shape
|
108 |
+
new_shape = net_g.enc_p.emb_phone.weight.shape
|
109 |
+
if old_shape != new_shape:
|
110 |
+
print(f"Resizing enc_p.emb_phone.weight: {old_shape} -> {new_shape}")
|
111 |
+
cpt['weight']['enc_p.emb_phone.weight'] = cpt['weight']['enc_p.emb_phone.weight'][:new_shape[0], :new_shape[1]]
|
112 |
|
113 |
del net_g.enc_q
|
114 |
|