From e225b0b995079b8c2a3fd56467e6b8e34baf179f Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Sun, 12 May 2024 10:43:50 -0700 Subject: [PATCH] downloader: fix downloading 01-ai/Yi-1.5-34B-Chat --- download-model.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/download-model.py b/download-model.py index 1681509f..465c76f9 100644 --- a/download-model.py +++ b/download-model.py @@ -138,9 +138,12 @@ class ModelDownloader: cursor = cursor.replace(b'=', b'%3D') # If both pytorch and safetensors are available, download safetensors only - if (has_pytorch or has_pt) and has_safetensors: + # Also if GGUF and safetensors are available, download only safetensors + # (why do people do this?) + if (has_pytorch or has_pt or has_gguf) and has_safetensors: + has_gguf = False for i in range(len(classifications) - 1, -1, -1): - if classifications[i] in ['pytorch', 'pt']: + if classifications[i] in ['pytorch', 'pt', 'gguf']: links.pop(i) # For GGUF, try to download only the Q4_K_M if no specific file is specified.