Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
liutaocode committed Aug 10, 2024
1 parent 8a51ce4 commit 67efd2c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions code/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,8 @@ def main(args):

# macOS Config
# Check if MPS is available
if torch.backends.mps.is_available():
if hasattr(torch.backends, 'mps') and torch.backends.mps.is_available():
args.device = torch.device("mps")
print("MPS backend is available.")
# else:
# args.device = torch.device("cpu")
# print("MPS backend is not available. Using CPU instead.")

main(args)

0 comments on commit 67efd2c

Please sign in to comment.