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,7 +75,8 @@ 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']:
|
||||||
|
if k not in avg.keys():
|
||||||
avg[k] = states[k].clone()
|
avg[k] = states[k].clone()
|
||||||
else:
|
else:
|
||||||
avg[k] += states[k]
|
avg[k] += states[k]
|
||||||
|
|||||||
Reference in New Issue
Block a user