FIX: Installation script + README

This commit is contained in:
Gourieff 2023-11-04 23:21:51 +07:00
parent b75aa16b11
commit bbc2481494
3 changed files with 9 additions and 12 deletions

View File

@ -198,7 +198,7 @@ Please, check the path where "inswapper_128.onnx" model is stored. It must be in
7. Then one-by-one:
- `pip install insightface==0.7.3`
- `pip install onnx`
- `pip install onnxruntime-gpu>=1.16.1` if you have CUDA, otherwise `pip install onnxruntime`
- `pip install onnxruntime-gpu>=1.16.1`
- `pip install opencv-python`
- `pip install tqdm`
8. Type `deactivate`, you can close your Terminal or Console and start your SD WebUI, ReActor should start OK - if not, welcome to the Issues section.
@ -233,9 +233,9 @@ and put it to the `stable-diffusion-webui\models\insightface` replacing existing
4. Then:
- `python -m pip install -U pip`
- `pip uninstall -y onnxruntime onnxruntime-gpu onnxruntime-silicon onnxruntime-extensions`
- `pip install onnxruntime-gpu>=1.16.1` if you have CUDA, otherwise `pip install onnxruntime`
- `pip install onnxruntime-gpu>=1.16.1`
If it didn't help - it seems that you have another extension reinstalling `onnxruntime` when SD WebUI checks requirements. Please see your extensions list. Some extensions can causes reinstalling of `onnxruntime` or `onnxruntime-gpu` to `onnxruntime<1.16.1` every time SD WebUI runs.<br>ORT 1.16.0 has a bug https://github.com/microsoft/onnxruntime/issues/17631 - don't install it!
If it didn't help - it seems that you have another extension reinstalling `onnxruntime` when SD WebUI checks requirements. Please see your extensions list. Some extensions can causes reinstalling of `onnxruntime-gpu` to `onnxruntime<1.16.1` every time SD WebUI runs.<br>ORT 1.16.0 has a bug https://github.com/microsoft/onnxruntime/issues/17631 - don't install it!
### **VII. "ImportError: cannot import name 'builder' from 'google.protobuf.internal'"**

View File

@ -205,7 +205,7 @@ Inpainting также работает, но замена лица происх
7. Далее:
- `pip install insightface==0.7.3`
- `pip install onnx`
- `pip install onnxruntime-gpu>=1.16.1` если у весть есть GPU с CUDA, иначе `pip install onnxruntime`
- `pip install onnxruntime-gpu>=1.16.1`
- `pip install opencv-python`
- `pip install tqdm`
8. Выполните `deactivate`, закройте Терминал или Консоль и запустите SD WebUI, ReActor должен запуститься без к-л проблем - если же нет, добро пожаловать в раздел "Issues".
@ -240,9 +240,9 @@ Inpainting также работает, но замена лица происх
4. Затем:
- `python -m pip install -U pip`
- `pip uninstall -y onnxruntime onnxruntime-gpu onnxruntime-silicon onnxruntime-extensions`
- `pip install onnxruntime-gpu>=1.16.1` если у весть есть GPU с CUDA, иначе `pip install onnxruntime`
- `pip install onnxruntime-gpu>=1.16.1`
Если это не помогло - значит какое-то другое расширение переустанавливает `onnxruntime` всякий раз, когда SD WebUI проверяет требования пакетов. Внимательно посмотрите список активных расширений. Некоторые расширения могут вызывать переустановку `onnxruntime` или `onnxruntime-gpu` на версию `onnxruntime<1.16.1` при каждом запуске SD WebUI.<br>ORT 1.16.0 выкатили с ошибкой https://github.com/microsoft/onnxruntime/issues/17631 - не устанавливайте её!
Если это не помогло - значит какое-то другое расширение переустанавливает `onnxruntime` всякий раз, когда SD WebUI проверяет требования пакетов. Внимательно посмотрите список активных расширений. Некоторые расширения могут вызывать переустановку `onnxruntime-gpu` на версию `onnxruntime<1.16.1` при каждом запуске SD WebUI.<br>ORT 1.16.0 выкатили с ошибкой https://github.com/microsoft/onnxruntime/issues/17631 - не устанавливайте её!
### **VII. "ImportError: cannot import name 'builder' from 'google.protobuf.internal'"**

View File

@ -95,19 +95,16 @@ except:
with open(req_file) as file:
install_count = 0
try:
ort = "onnxruntime-gpu"
import torch.cuda as cuda
if cuda.is_available():
ort = "onnxruntime-gpu"
if first_run:
last_device = "CUDA"
with open(os.path.join(BASE_PATH, "last_device.txt"), "w") as txt:
txt.write(last_device)
else:
ort = "onnxruntime"
if last_device == "CUDA":
last_device = "CPU"
with open("last_device.txt", "w") as txt:
txt.write(last_device)
with open(os.path.join(BASE_PATH, "last_device.txt"), "w") as txt:
txt.write(last_device)
if not is_installed(ort,"1.16.1",False):
install_count += 1
run_pip(ort)