feat: 'use_cpu' device

This commit is contained in:
Bingsu
2023-06-22 11:24:38 +09:00
parent 87c3cf3e4f
commit c08b869eb7
2 changed files with 7 additions and 6 deletions

View File

@@ -1 +1 @@
__version__ = "23.6.3"
__version__ = "23.6.4.dev0"

View File

@@ -201,15 +201,16 @@ class AfterDetailerScript(scripts.Script):
@staticmethod
def get_ultralytics_device() -> str:
'`device = ""` means autodetect'
device = ""
if "adetailer" in shared.cmd_opts.use_cpu:
return "cpu"
if platform.system() == "Darwin":
return device
return ""
if any(getattr(cmd_opts, vram, False) for vram in ["lowvram", "medvram"]):
device = "cpu"
return "cpu"
return device
return ""
def prompt_blank_replacement(
self, all_prompts: list[str], i: int, default: str