mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-06-05 09:27:17 +02: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":
|
elif vram_usage_level == "high":
|
||||||
env_entries["COMMANDLINE_ARGS"][0] += " --always-high-vram"
|
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 = {}
|
env = {}
|
||||||
for key, paths in env_entries.items():
|
for key, paths in env_entries.items():
|
||||||
paths = [p.replace("/", os.path.sep) for p in paths]
|
paths = [p.replace("/", os.path.sep) for p in paths]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user