Skip to content

Commit

Permalink
Merge pull request adefossez#1 from elidourado/patch-2
Browse files Browse the repository at this point in the history
Use mps by default if available
  • Loading branch information
adefossez authored Dec 8, 2023
2 parents f774e03 + 6a5cefa commit 08cf353
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion demucs/separate.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@ def get_parser():
'Default is "{track}/{stem}.{ext}".')
parser.add_argument("-d",
"--device",
default="cuda" if th.cuda.is_available() else "cpu",
default=(
"cuda"
if th.cuda.is_available()
else "mps"
if th.backends.mps.is_available()
else "cpu"
),
help="Device to use, default is cuda if available else cpu")
parser.add_argument("--shifts",
default=1,
Expand Down

0 comments on commit 08cf353

Please sign in to comment.