install filetype only if needed

This commit is contained in:
Andray 2024-07-07 10:14:53 +04:00
parent 13df575465
commit e86c2a4b4d
3 changed files with 4 additions and 2 deletions

View File

@ -403,6 +403,10 @@ def prepare_environment():
run_pip("install ngrok", "ngrok")
startup_timer.record("install ngrok")
if not is_installed('filetype') and args.use_mime_file_filtering_for_batch_from_dir:
run_pip("install filetype")
startup_timer.record("install filetype")
os.makedirs(os.path.join(script_path, dir_repos), exist_ok=True)
git_clone(assets_repo, repo_dir('stable-diffusion-webui-assets'), "assets", assets_commit_hash)

View File

@ -32,4 +32,3 @@ torchdiffeq
torchsde
transformers==4.30.2
pillow-avif-plugin==1.4.3
filetype

View File

@ -33,4 +33,3 @@ torchsde==0.2.6
transformers==4.30.2
httpx==0.24.1
pillow-avif-plugin==1.4.3
filetype