Spaces:
Runtime error
Runtime error
Update app_multi.py
Browse files- app_multi.py +3 -1
app_multi.py
CHANGED
|
@@ -108,7 +108,9 @@ for model_name in multi_cfg.get('models'):
|
|
| 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 |
-
|
|
|
|
|
|
|
| 112 |
|
| 113 |
del net_g.enc_q
|
| 114 |
|
|
|
|
| 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 |
+
weight = cpt['weight']['enc_p.emb_phone.weight']
|
| 112 |
+
resized_weight = weight[:, :new_shape[1]].resize_(new_shape)
|
| 113 |
+
cpt['weight']['enc_p.emb_phone.weight'] = resized_weight
|
| 114 |
|
| 115 |
del net_g.enc_q
|
| 116 |
|