remove excess code

since cmd_opts is not parsed when install.py is loaded
Arm CPUs and/or macOS cannot use  without installing onnxruntime package manually
see: https://onnxruntime.ai/docs/get-started/with-python.html#install-onnx-runtime
pull/41/head
toshiaki1729 2022-12-11 18:52:33 +09:00
parent f7d29328b5
commit 41ebf7248b
1 changed files with 2 additions and 7 deletions

View File

@ -1,9 +1,4 @@
import launch
from modules.shared import cmd_opts
if 'all' in cmd_opts.use_cpu or 'interrogate' in cmd_opts.use_cpu:
if not launch.is_installed("onnxruntime"):
launch.run_pip("install onnxruntime", "requirements for using SmilingWolf/wd-v1-4-vit-tagger on CPU device")
else:
if not launch.is_installed("onnxruntime-gpu"):
launch.run_pip("install onnxruntime-gpu", "requirements for using SmilingWolf/wd-v1-4-vit-tagger on GPU device")
if not launch.is_installed("onnxruntime-gpu"):
launch.run_pip("install onnxruntime-gpu", "requirements for using SmilingWolf/wd-v1-4-vit-tagger")