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
@@ -137,11 +137,11 @@ class Config(metaclass=Singleton):
|
||||
logging.warning("Using insecure weight loading for fairseq dictionary")
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
|
||||
@staticmethod
|
||||
def get_default_batch_size() -> int:
|
||||
if not torch.cuda.is_available():
|
||||
#TODO: add non-cuda multicards
|
||||
# TODO: add non-cuda multicards
|
||||
return 1
|
||||
# 判断是否有能用来训练和加速推理的N卡
|
||||
ngpu = torch.cuda.device_count()
|
||||
@@ -155,7 +155,10 @@ class Config(metaclass=Singleton):
|
||||
mem.append(
|
||||
int(
|
||||
torch.cuda.get_device_properties(i).total_memory
|
||||
/ 1024 / 1024 / 1024 + 0.4
|
||||
/ 1024
|
||||
/ 1024
|
||||
/ 1024
|
||||
+ 0.4
|
||||
)
|
||||
)
|
||||
if if_gpu_ok:
|
||||
|
||||
Reference in New Issue
Block a user