mirror of
https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-06-05 01:10:22 +08:00
chore(format): run black on dev (#125)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
033306439c
commit
51170b24c4
@@ -141,7 +141,7 @@ class Config(metaclass=Singleton):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def get_default_batch_size() -> int:
|
def get_default_batch_size() -> int:
|
||||||
if not torch.cuda.is_available():
|
if not torch.cuda.is_available():
|
||||||
#TODO: add non-cuda multicards
|
# TODO: add non-cuda multicards
|
||||||
return 1
|
return 1
|
||||||
# 判断是否有能用来训练和加速推理的N卡
|
# 判断是否有能用来训练和加速推理的N卡
|
||||||
ngpu = torch.cuda.device_count()
|
ngpu = torch.cuda.device_count()
|
||||||
@@ -155,7 +155,10 @@ class Config(metaclass=Singleton):
|
|||||||
mem.append(
|
mem.append(
|
||||||
int(
|
int(
|
||||||
torch.cuda.get_device_properties(i).total_memory
|
torch.cuda.get_device_properties(i).total_memory
|
||||||
/ 1024 / 1024 / 1024 + 0.4
|
/ 1024
|
||||||
|
/ 1024
|
||||||
|
/ 1024
|
||||||
|
+ 0.4
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if if_gpu_ok:
|
if if_gpu_ok:
|
||||||
|
|||||||
Reference in New Issue
Block a user