mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-02-16 10:29:39 +01:00
[webui] Force full-precision on NVIDIA 16xx graphics cards
This commit is contained in:
parent
f514fe6c11
commit
76c8e18fcf
@ -379,6 +379,16 @@ def get_env():
|
||||
elif vram_usage_level == "high":
|
||||
env_entries["COMMANDLINE_ARGS"][0] += " --always-high-vram"
|
||||
|
||||
# check and force full-precision on NVIDIA 16xx graphics cards
|
||||
import torch
|
||||
from easydiffusion.device_manager import needs_to_force_full_precision
|
||||
|
||||
c = local()
|
||||
c.device_name = torch.cuda.get_device_name()
|
||||
|
||||
if needs_to_force_full_precision(c):
|
||||
env_entries["COMMANDLINE_ARGS"][0] += " --no-half --precision full"
|
||||
|
||||
env = {}
|
||||
for key, paths in env_entries.items():
|
||||
paths = [p.replace("/", os.path.sep) for p in paths]
|
||||
|
Loading…
Reference in New Issue
Block a user