sd-webui-reactor/scripts/reactor_globals.py
Gourieff b75aa16b11 UPDATE: CUDA Support
- Full support of ORT-GPU alongside with ORT
- New opton in Settings: Execution Provider selector
- Many different fixes and improvements
VersionUP (0.5.0 alpha2)
2023-11-04 22:37:07 +07:00

19 lines
426 B
Python

import os
from pathlib import Path
IS_RUN: bool = False
BASE_PATH = os.path.join(Path(__file__).parents[1])
DEVICE_LIST: list = ["CPU", "CUDA"]
def updateDevice():
try:
LAST_DEVICE_PATH = os.path.join(BASE_PATH, "last_device.txt")
with open(LAST_DEVICE_PATH) as f:
for el in f:
device = el.strip()
except:
device = "CPU"
return device
DEVICE = updateDevice()