diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2022-12-03 07:30:34 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-03 07:30:34 +0000 |
commit | 681c0003df071a311142dd09628dfcaac8c73d5b (patch) | |
tree | b859c3688b8c77a760ffe31148ae109885ee7940 /modules/devices.py | |
parent | 37fc1fa401c13369f42a77542d07ed81d6c8b59a (diff) | |
parent | 62e9fec3df8518da3a2c35fa090bb54946c856b2 (diff) | |
download | stable-diffusion-webui-gfx803-681c0003df071a311142dd09628dfcaac8c73d5b.tar.gz stable-diffusion-webui-gfx803-681c0003df071a311142dd09628dfcaac8c73d5b.tar.bz2 stable-diffusion-webui-gfx803-681c0003df071a311142dd09628dfcaac8c73d5b.zip |
Merge pull request #4407 from yoinked-h/patch-1
Fix issue with 16xx cards
Diffstat (limited to 'modules/devices.py')
-rw-r--r-- | modules/devices.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/devices.py b/modules/devices.py index 046460fa..1325569c 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -53,10 +53,17 @@ 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: + torch.backends.cudnn.benchmark = True + torch.backends.cudnn.enabled = True torch.backends.cuda.matmul.allow_tf32 = True torch.backends.cudnn.allow_tf32 = True + errors.run(enable_tf32, "Enabling TF32") cpu = torch.device("cpu") |