Skip to content

Commit

Permalink
Make the "no GPU has been detected" message more descriptive
Browse files Browse the repository at this point in the history
  • Loading branch information
oobabooga committed Mar 15, 2023
1 parent 67d6247 commit 66256ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def load_model(model_name):
command = "AutoModelForCausalLM.from_pretrained"
params = ["low_cpu_mem_usage=True"]
if not shared.args.cpu and not torch.cuda.is_available():
print("Warning: no GPU has been detected.\nFalling back to CPU mode.\n")
print("Warning: torch.cuda.is_available() returned False.\nThis means that no GPU has been detected.\nFalling back to CPU mode.\n")
shared.args.cpu = True

if shared.args.cpu:
Expand Down

0 comments on commit 66256ac

Please sign in to comment.