mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(config): drop nonexistent config.use_cpu
setting
This commit is contained in:
parent
a72cea014c
commit
7b1f9409bc
@ -16,9 +16,7 @@ config = InvokeAIAppConfig.get_config()
|
|||||||
|
|
||||||
def choose_torch_device() -> torch.device:
|
def choose_torch_device() -> torch.device:
|
||||||
"""Convenience routine for guessing which GPU device to run model on"""
|
"""Convenience routine for guessing which GPU device to run model on"""
|
||||||
if config.use_cpu: # legacy setting - force CPU
|
if config.device == "auto":
|
||||||
return CPU_DEVICE
|
|
||||||
elif config.device == "auto":
|
|
||||||
if torch.cuda.is_available():
|
if torch.cuda.is_available():
|
||||||
return torch.device("cuda")
|
return torch.device("cuda")
|
||||||
if hasattr(torch.backends, "mps") and torch.backends.mps.is_available():
|
if hasattr(torch.backends, "mps") and torch.backends.mps.is_available():
|
||||||
|
Loading…
Reference in New Issue
Block a user