mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-26 01:30: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()
|
||||
|
||||
# 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():
|
||||
print("Loading in .pt format...")
|
||||
model = torch.load(Path(f"torch-dumps/{model_name}.pt"))
|
||||
|
Loading…
Reference in New Issue
Block a user