refact
refact copied to clipboard
No progress bar in web GUI when downloading layers
When selecting a new model, the web GUI shows message "loading model" but there's no progress bar. Only in the container's logs I can see that the layers are being downloaded.
Downloading layers.021.ln_m.weight: 100%|██████████| 5.51k/5.51k [00:00<00:00, 2.49MB/s]
Downloading layers.021.ln_m.bias: 100%|██████████| 5.51k/5.51k [00:00<00:00, 2.08MB/s]
-- 33 -- 20230905 10:34:50 WEBUI 172.17.0.1:37680 - "GET /tab-host-have-gpus HTTP/1.1" 200
-- 31 --
Downloading layers.021.pw.W1: 0%| | 0.00/52.4M [00:00<?, ?B/s]
-- 33 -- 20230905 10:34:52 WEBUI 172.17.0.1:37680 - "GET /tab-host-have-gpus HTTP/1.1" 200
Downloading layers.021.pw.W1: 20%|█▉ | 10.5M/52.4M [00:01<00:07, 5.34MB/s]
-- 33 -- 20230905 10:34:54 WEBUI 172.17.0.1:37680 - "GET /tab-host-have-gpus HTTP/1.1" 200
Downloading layers.021.pw.W1: 40%|███▉ | 21.0M/52.4M [00:03<00:05, 6.05MB/s]
Downloading layers.021.pw.W1: 60%|█████▉ | 31.5M/52.4M [00:05<00:03, 6.35MB/s]
-- 33 -- 20230905 10:34:56 WEBUI 172.17.0.1:37680 - "GET /tab-host-have-gpus HTTP/1.1" 200
-- 33 -- 20230905 10:34:58 WEBUI 172.17.0.1:37680 - "GET /tab-host-have-gpus HTTP/1.1" 200
Downloading layers.021.pw.W1: 80%|███████▉ | 41.9M/52.4M [00:06<00:01, 6.20MB/s]
Downloading layers.021.pw.W1: 100%|██████████| 52.4M/52.4M [00:08<00:00, 6.32MB/s]
-- 33 -- 20230905 10:35:00 WEBUI 172.17.0.1:37680 - "GET /tab-host-have-gpus HTTP/1.1" 200
Etc.
Also the model in command is different than selected one which creates confusion as to which model is actually being loaded.
It's kind of expected, unless we want to hack into the model download process, or parse text output, we don't have a way to forward the progress into the GUI.
But maybe someone could find a cheap and easy way to do it 🤷