Skip to content

Commit

Permalink
chore: ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
psychedelicious authored and hipsterusername committed Mar 27, 2024
1 parent a291a42 commit a397fdb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions invokeai/backend/util/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ def choose_torch_device() -> torch.device:
else:
return torch.device(config.device)


def get_torch_device_name() -> str:
device = choose_torch_device()
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
# configurations. It is strongly recommended to pass the app_config to this function.
def choose_precision(
Expand Down

0 comments on commit a397fdb

Please sign in to comment.