mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2025-12-19 04:59:42 +01:00
fix: 卸载音色省显存
顺便将所有print换成了统一的logger
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import os
|
||||
import traceback
|
||||
import logging
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
import numpy as np
|
||||
import torch
|
||||
@@ -110,7 +112,7 @@ class TextAudioLoaderMultiNSFsid(torch.utils.data.Dataset):
|
||||
try:
|
||||
spec = torch.load(spec_filename)
|
||||
except:
|
||||
print(spec_filename, traceback.format_exc())
|
||||
logger.warn(spec_filename, traceback.format_exc())
|
||||
spec = spectrogram_torch(
|
||||
audio_norm,
|
||||
self.filter_length,
|
||||
@@ -302,7 +304,7 @@ class TextAudioLoader(torch.utils.data.Dataset):
|
||||
try:
|
||||
spec = torch.load(spec_filename)
|
||||
except:
|
||||
print(spec_filename, traceback.format_exc())
|
||||
logger.warn(spec_filename, traceback.format_exc())
|
||||
spec = spectrogram_torch(
|
||||
audio_norm,
|
||||
self.filter_length,
|
||||
|
||||
Reference in New Issue
Block a user