mirror of
https://github.com/FunAudioLLM/CosyVoice.git
synced 2026-02-05 18:09:24 +08:00
fix bug
This commit is contained in:
@@ -75,10 +75,11 @@ def main():
|
|||||||
print('Processing {}'.format(path))
|
print('Processing {}'.format(path))
|
||||||
states = torch.load(path, map_location=torch.device('cpu'))
|
states = torch.load(path, map_location=torch.device('cpu'))
|
||||||
for k in states.keys():
|
for k in states.keys():
|
||||||
if k not in avg.keys() and k not in ['step', 'epoch']:
|
if k not in ['step', 'epoch']:
|
||||||
avg[k] = states[k].clone()
|
if k not in avg.keys():
|
||||||
else:
|
avg[k] = states[k].clone()
|
||||||
avg[k] += states[k]
|
else:
|
||||||
|
avg[k] += states[k]
|
||||||
# average
|
# average
|
||||||
for k in avg.keys():
|
for k in avg.keys():
|
||||||
if avg[k] is not None:
|
if avg[k] is not None:
|
||||||
|
|||||||
Reference in New Issue
Block a user