config.py :

现在在检查半精度计算前会先检查CUDA
webui.py :
  优化users.py的写入
This commit is contained in:
YuChuXi
2024-01-27 14:11:10 +08:00
parent f9387e0af8
commit a0af8c32de
2 changed files with 24 additions and 15 deletions

View File

@@ -29,16 +29,17 @@ webui_port_subfix = 9871
api_port = 9880
gpu_name = torch.cuda.get_device_name(0)
if (
("16" in gpu_name and "V100" not in gpu_name.upper())
or "P40" in gpu_name.upper()
or "P10" in gpu_name.upper()
or "1060" in gpu_name
or "1070" in gpu_name
or "1080" in gpu_name
):
is_half=False
if infer_device == "cuda":
gpu_name = torch.cuda.get_device_name(0)
if (
("16" in gpu_name and "V100" not in gpu_name.upper())
or "P40" in gpu_name.upper()
or "P10" in gpu_name.upper()
or "1060" in gpu_name
or "1070" in gpu_name
or "1080" in gpu_name
):
is_half=False
if(infer_device=="cpu"):is_half=False