mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2025-12-22 22:50:06 +01:00
chore(format): run black on dev
This commit is contained in:
@@ -38,26 +38,28 @@ class VC:
|
||||
|
||||
to_return_protect0 = {
|
||||
"visible": self.if_f0 != 0,
|
||||
"value": to_return_protect[0]
|
||||
if self.if_f0 != 0 and to_return_protect
|
||||
else 0.5,
|
||||
"value": (
|
||||
to_return_protect[0] if self.if_f0 != 0 and to_return_protect else 0.5
|
||||
),
|
||||
"__type__": "update",
|
||||
}
|
||||
to_return_protect1 = {
|
||||
"visible": self.if_f0 != 0,
|
||||
"value": to_return_protect[1]
|
||||
if self.if_f0 != 0 and to_return_protect
|
||||
else 0.33,
|
||||
"value": (
|
||||
to_return_protect[1] if self.if_f0 != 0 and to_return_protect else 0.33
|
||||
),
|
||||
"__type__": "update",
|
||||
}
|
||||
|
||||
if sid == "" or sid == []:
|
||||
if self.hubert_model is not None: # 考虑到轮询, 需要加个判断看是否 sid 是由有模型切换到无模型的
|
||||
if (
|
||||
self.hubert_model is not None
|
||||
): # 考虑到轮询, 需要加个判断看是否 sid 是由有模型切换到无模型的
|
||||
logger.info("Clean model cache")
|
||||
del (self.net_g, self.n_spk, self.hubert_model, self.tgt_sr) # ,cpt
|
||||
self.hubert_model = (
|
||||
self.net_g
|
||||
) = self.n_spk = self.hubert_model = self.tgt_sr = None
|
||||
self.hubert_model = self.net_g = self.n_spk = self.hubert_model = (
|
||||
self.tgt_sr
|
||||
) = None
|
||||
if torch.cuda.is_available():
|
||||
torch.cuda.empty_cache()
|
||||
###楼下不这么折腾清理不干净
|
||||
|
||||
Reference in New Issue
Block a user