Unverified Commit 254d9946 authored by FNSpd's avatar FNSpd Committed by GitHub
Browse files

Update devices.py

parent a9fed7c3
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -110,7 +110,7 @@ def autocast(disable=False):
    if disable:
    if disable:
        return contextlib.nullcontext()
        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 contextlib.nullcontext()


    return torch.autocast("cuda")
    return torch.autocast("cuda")