mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-06-07 21:20:49 +00:00
display a progressbar for extension installer
This commit is contained in:
parent
90eb731ff1
commit
7afe7375e1
@ -7,6 +7,7 @@ import importlib.util
|
|||||||
import platform
|
import platform
|
||||||
import json
|
import json
|
||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
|
from tqdm.auto import tqdm
|
||||||
|
|
||||||
from modules import cmd_args, errors
|
from modules import cmd_args, errors
|
||||||
from modules.paths_internal import script_path, extensions_dir
|
from modules.paths_internal import script_path, extensions_dir
|
||||||
@ -224,7 +225,10 @@ def run_extensions_installers(settings_file):
|
|||||||
if not os.path.isdir(extensions_dir):
|
if not os.path.isdir(extensions_dir):
|
||||||
return
|
return
|
||||||
|
|
||||||
for dirname_extension in list_extensions(settings_file):
|
pbar_extensions = tqdm(list_extensions(settings_file),
|
||||||
|
bar_format="{desc}: |{bar}|{percentage:3.0f}% [{n_fmt}/{total_fmt} {elapsed}<{remaining}]")
|
||||||
|
for dirname_extension in pbar_extensions:
|
||||||
|
pbar_extensions.set_description("Installing %s" % dirname_extension)
|
||||||
run_extension_installer(os.path.join(extensions_dir, dirname_extension))
|
run_extension_installer(os.path.join(extensions_dir, dirname_extension))
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user