mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
chore: ruff
This commit is contained in:
parent
a291a42abc
commit
a397fdbd25
@ -27,10 +27,12 @@ def choose_torch_device() -> torch.device:
|
|||||||
else:
|
else:
|
||||||
return torch.device(config.device)
|
return torch.device(config.device)
|
||||||
|
|
||||||
|
|
||||||
def get_torch_device_name() -> str:
|
def get_torch_device_name() -> str:
|
||||||
device = choose_torch_device()
|
device = choose_torch_device()
|
||||||
return torch.cuda.get_device_name(device) if device.type == "cuda" else device.type.upper()
|
return torch.cuda.get_device_name(device) if device.type == "cuda" else device.type.upper()
|
||||||
|
|
||||||
|
|
||||||
# We are in transition here from using a single global AppConfig to allowing multiple
|
# We are in transition here from using a single global AppConfig to allowing multiple
|
||||||
# configurations. It is strongly recommended to pass the app_config to this function.
|
# configurations. It is strongly recommended to pass the app_config to this function.
|
||||||
def choose_precision(
|
def choose_precision(
|
||||||
|
Loading…
Reference in New Issue
Block a user