From 94afa0f9cf5c59629e505ec7cf93849d429fa4f4 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Mon, 1 Jan 2024 16:00:22 -0800 Subject: [PATCH] Minor style changes --- modules/models.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/modules/models.py b/modules/models.py index 7f338712..efdae7cb 100644 --- a/modules/models.py +++ b/modules/models.py @@ -126,7 +126,6 @@ def load_tokenizer(model_name, model): def huggingface_loader(model_name): - path_to_model = Path(f'{shared.args.model_dir}/{model_name}') params = { 'low_cpu_mem_usage': True, @@ -170,10 +169,8 @@ def huggingface_loader(model_name): # Load with quantization and/or offloading else: - if not any((shared.args.cpu, torch.cuda.is_available(), is_xpu_available(), torch.backends.mps.is_available())): logger.warning('torch.cuda.is_available() and is_xpu_available() returned False. This means that no GPU has been detected. Falling back to CPU mode.') - shared.args.cpu = True if shared.args.cpu: