mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Fix
This commit is contained in:
6
utils.py
6
utils.py
@@ -211,7 +211,8 @@ def _download_with_aria2(aria2_config: str, total_length: int, directory: str =
|
||||
done = True
|
||||
break
|
||||
if bar is None:
|
||||
bar = tqdm(total=total_length, desc=f"[aria2] Downloading model", unit="B", unit_scale=True, unit_divisor=1000)
|
||||
bar = tqdm.tqdm(total=total_length, desc=f"[aria2] Downloading model", unit="B", unit_scale=True, unit_divisor=1000)
|
||||
koboldai_vars.total_download_chunks = total_length
|
||||
visited = set()
|
||||
for x in r:
|
||||
filename = x["files"][0]["path"]
|
||||
@@ -220,7 +221,8 @@ def _download_with_aria2(aria2_config: str, total_length: int, directory: str =
|
||||
for k, v in lengths.items():
|
||||
if k not in visited:
|
||||
lengths[k] = (v[1], v[1])
|
||||
bar.n = sum(v[0] for v in lengths.values())
|
||||
koboldai_vars.downloaded_chunks = sum(v[0] for v in lengths.values())
|
||||
bar.n = koboldai_vars.downloaded_chunks
|
||||
bar.update()
|
||||
time.sleep(0.1)
|
||||
path = f.name
|
||||
|
Reference in New Issue
Block a user