mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-01-20 11:00:23 +00:00
@@ -113,7 +113,7 @@ class TextAudioLoaderMultiNSFsid(torch.utils.data.Dataset):
|
||||
try:
|
||||
spec = torch.load(spec_filename)
|
||||
except:
|
||||
logger.warn(spec_filename, traceback.format_exc())
|
||||
logger.warn("%s %s", spec_filename, traceback.format_exc())
|
||||
spec = spectrogram_torch(
|
||||
audio_norm,
|
||||
self.filter_length,
|
||||
@@ -305,7 +305,7 @@ class TextAudioLoader(torch.utils.data.Dataset):
|
||||
try:
|
||||
spec = torch.load(spec_filename)
|
||||
except:
|
||||
logger.warn(spec_filename, traceback.format_exc())
|
||||
logger.warn("%s %s", spec_filename, traceback.format_exc())
|
||||
spec = spectrogram_torch(
|
||||
audio_norm,
|
||||
self.filter_length,
|
||||
|
||||
@@ -54,9 +54,9 @@ def spectrogram_torch(y, n_fft, sampling_rate, hop_size, win_size, center=False)
|
||||
"""
|
||||
# Validation
|
||||
if torch.min(y) < -1.07:
|
||||
logger.debug("min value is ", torch.min(y))
|
||||
logger.debug("min value is %s", str(torch.min(y)))
|
||||
if torch.max(y) > 1.07:
|
||||
logger.debug("max value is ", torch.max(y))
|
||||
logger.debug("max value is %s", str(torch.max(y)))
|
||||
|
||||
# Window - Cache if needed
|
||||
global hann_window
|
||||
|
||||
@@ -35,12 +35,12 @@ def load_checkpoint_d(checkpoint_path, combd, sbd, optimizer=None, load_opt=1):
|
||||
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)
|
||||
, k, state_dict[k].shape, saved_state_dict[k].shape
|
||||
) #
|
||||
raise KeyError
|
||||
except:
|
||||
# logger.info(traceback.format_exc())
|
||||
logger.info("%s is not in the checkpoint" % k) # pretrain缺失的
|
||||
logger.info("%s is not in the checkpoint", k) # pretrain缺失的
|
||||
new_state_dict[k] = v # 模型自带的随机值
|
||||
if hasattr(model, "module"):
|
||||
model.module.load_state_dict(new_state_dict, strict=False)
|
||||
@@ -111,12 +111,12 @@ def load_checkpoint(checkpoint_path, model, optimizer=None, load_opt=1):
|
||||
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)
|
||||
, k, state_dict[k].shape, saved_state_dict[k].shape
|
||||
) #
|
||||
raise KeyError
|
||||
except:
|
||||
# logger.info(traceback.format_exc())
|
||||
logger.info("%s is not in the checkpoint" % k) # pretrain缺失的
|
||||
logger.info("%s is not in the checkpoint", k) # pretrain缺失的
|
||||
new_state_dict[k] = v # 模型自带的随机值
|
||||
if hasattr(model, "module"):
|
||||
model.module.load_state_dict(new_state_dict, strict=False)
|
||||
|
||||
Reference in New Issue
Block a user