aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/devices.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/devices.py b/modules/devices.py
index 52c3e7cd..6c6c7233 100644
--- a/modules/devices.py
+++ b/modules/devices.py
@@ -110,7 +110,7 @@ def autocast(disable=False):
if disable:
return contextlib.nullcontext()
- if dtype == torch.float32 or shared.cmd_opts.precision == "full":
+ if dtype == torch.float32 or shared.cmd_opts.precision == "full" or shared.cmd_opts.upcast_sampling:
return contextlib.nullcontext()
return torch.autocast("cuda")