diff options
author | AUTOMATIC <16777216c@gmail.com> | 2022-12-03 13:01:23 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2022-12-03 13:01:23 +0000 |
commit | 46b0d230e7c13e247eabb22e1103ce512e7ed6b1 (patch) | |
tree | 5011296416ec851d748f2546ff9564f5d819098d | |
parent | 2651267e3af5886b8b6b1dc3023f2507f7079118 (diff) | |
download | stable-diffusion-webui-gfx803-46b0d230e7c13e247eabb22e1103ce512e7ed6b1.tar.gz stable-diffusion-webui-gfx803-46b0d230e7c13e247eabb22e1103ce512e7ed6b1.tar.bz2 stable-diffusion-webui-gfx803-46b0d230e7c13e247eabb22e1103ce512e7ed6b1.zip |
add comment for #4407 and remove seemingly unnecessary cudnn.enabled
-rw-r--r-- | modules/devices.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/devices.py b/modules/devices.py index 547ea46c..d6a76844 100644 --- a/modules/devices.py +++ b/modules/devices.py @@ -53,9 +53,11 @@ def torch_gc(): def enable_tf32(): if torch.cuda.is_available(): + + # enabling benchmark option seems to enable a range of cards to do fp16 when they otherwise can't + # see https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/4407 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 |