mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-23 00:18:20 +01:00
add auto-devices when disk is used
This commit is contained in:
parent
759da435e3
commit
5390fc87c8
@ -63,7 +63,7 @@ def load_model(model_name):
|
|||||||
t0 = time.time()
|
t0 = time.time()
|
||||||
|
|
||||||
# Default settings
|
# Default settings
|
||||||
if not (args.cpu or args.auto_devices or args.load_in_8bit or args.max_gpu_memory is not None):
|
if not (args.cpu or args.load_in_8bit or args.auto_devices or args.disk or args.max_gpu_memory is not None):
|
||||||
if Path(f"torch-dumps/{model_name}.pt").exists():
|
if Path(f"torch-dumps/{model_name}.pt").exists():
|
||||||
print("Loading in .pt format...")
|
print("Loading in .pt format...")
|
||||||
model = torch.load(Path(f"torch-dumps/{model_name}.pt"))
|
model = torch.load(Path(f"torch-dumps/{model_name}.pt"))
|
||||||
|
Loading…
Reference in New Issue
Block a user