diff options
author | AUTOMATIC <16777216c@gmail.com> | 2022-12-03 12:57:52 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2022-12-03 12:57:52 +0000 |
commit | 2651267e3af5886b8b6b1dc3023f2507f7079118 (patch) | |
tree | fb655cb8be97adec6a15a334ae8d5aae7d041c3e /modules/devices.py | |
parent | ce049c471b4a1d22f5a8fe8f527788edcf934eda (diff) | |
download | stable-diffusion-webui-gfx803-2651267e3af5886b8b6b1dc3023f2507f7079118.tar.gz stable-diffusion-webui-gfx803-2651267e3af5886b8b6b1dc3023f2507f7079118.tar.bz2 stable-diffusion-webui-gfx803-2651267e3af5886b8b6b1dc3023f2507f7079118.zip |
fix #4407 breaking UI entirely for card other than ones related to the PR
Diffstat (limited to 'modules/devices.py')
-rw-r--r-- | modules/devices.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/devices.py b/modules/devices.py index 1325569c..547ea46c 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -53,12 +53,10 @@ def torch_gc(): def enable_tf32(): if torch.cuda.is_available(): - for devid in range(0,torch.cuda.device_count()): - if torch.cuda.get_device_capability(devid) == (7, 5): - shd = True - if shd: + if any([torch.cuda.get_device_capability(devid) == (7, 5) for devid in range(0, torch.cuda.device_count())]): torch.backends.cudnn.benchmark = True torch.backends.cudnn.enabled = True + torch.backends.cuda.matmul.allow_tf32 = True torch.backends.cudnn.allow_tf32 = True |