mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 16:17:57 +01:00
Make the "no GPU has been detected" message more descriptive
This commit is contained in:
parent
67d62475dc
commit
66256ac1dd
@ -98,7 +98,7 @@ def load_model(model_name):
|
|||||||
command = "AutoModelForCausalLM.from_pretrained"
|
command = "AutoModelForCausalLM.from_pretrained"
|
||||||
params = ["low_cpu_mem_usage=True"]
|
params = ["low_cpu_mem_usage=True"]
|
||||||
if not shared.args.cpu and not torch.cuda.is_available():
|
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
|
shared.args.cpu = True
|
||||||
|
|
||||||
if shared.args.cpu:
|
if shared.args.cpu:
|
||||||
|
Loading…
Reference in New Issue
Block a user