mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2025-12-21 14:09:41 +01:00
Format code (#1169)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
0fc160c03e
commit
c7bbf0bfd0
@@ -34,8 +34,10 @@ def load_checkpoint_d(checkpoint_path, combd, sbd, optimizer=None, load_opt=1):
|
||||
new_state_dict[k] = saved_state_dict[k]
|
||||
if saved_state_dict[k].shape != state_dict[k].shape:
|
||||
logger.warn(
|
||||
"shape-%s-mismatch. need: %s, get: %s"
|
||||
, k, state_dict[k].shape, saved_state_dict[k].shape
|
||||
"shape-%s-mismatch. need: %s, get: %s",
|
||||
k,
|
||||
state_dict[k].shape,
|
||||
saved_state_dict[k].shape,
|
||||
) #
|
||||
raise KeyError
|
||||
except:
|
||||
@@ -110,8 +112,10 @@ def load_checkpoint(checkpoint_path, model, optimizer=None, load_opt=1):
|
||||
new_state_dict[k] = saved_state_dict[k]
|
||||
if saved_state_dict[k].shape != state_dict[k].shape:
|
||||
logger.warn(
|
||||
"shape-%s-mismatch|need-%s|get-%s"
|
||||
, k, state_dict[k].shape, saved_state_dict[k].shape
|
||||
"shape-%s-mismatch|need-%s|get-%s",
|
||||
k,
|
||||
state_dict[k].shape,
|
||||
saved_state_dict[k].shape,
|
||||
) #
|
||||
raise KeyError
|
||||
except:
|
||||
|
||||
Reference in New Issue
Block a user