fix: Error when downloading model from UI (#3014)

This commit is contained in:
jeckyhl 2023-07-05 16:27:29 +02:00 committed by GitHub
parent e0a50fb77a
commit 88a747b5b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,7 +23,7 @@ from tqdm.contrib.concurrent import thread_map
class ModelDownloader: class ModelDownloader:
def __init__(self, max_retries): def __init__(self, max_retries = 5):
self.s = requests.Session() self.s = requests.Session()
if max_retries: if max_retries:
self.s.mount('https://cdn-lfs.huggingface.co', HTTPAdapter(max_retries=max_retries)) self.s.mount('https://cdn-lfs.huggingface.co', HTTPAdapter(max_retries=max_retries))