Akegarasu / lora-scripts

SD-Trainer. LoRA & Dreambooth training scripts & GUI use kohya-ss's trainer, for diffusion model.
GNU Affero General Public License v3.0
4.66k stars 573 forks source link

启动gui.py会卸载原有的onnxruntime-gpu安装错误的版本 #574

Closed waterminer closed 2 weeks ago

waterminer commented 2 weeks ago

我是用conda的环境,因为install.ps2会再创建一个venv环境,所以我是自行安装的

在运行gui.py之前我的pip列表如下所示

(diffuser) PS E:\lora-scripts> pip list
Package                   Version     Editable project location
------------------------- ----------- ------------------------------
absl-py                   2.1.0
accelerate                0.33.0
aiofiles                  23.2.1
aiohappyeyeballs          2.4.3
aiohttp                   3.10.10
aiosignal                 1.3.1
altair                    4.2.2
annotated-types           0.7.0
anyio                     4.6.2.post1
appdirs                   1.4.4
attrs                     24.2.0
bitsandbytes              0.43.3
cachetools                5.5.0
certifi                   2024.8.30
charset-normalizer        3.4.0
click                     8.1.7
colorama                  0.4.6
coloredlogs               15.0.1
contourpy                 1.3.0
cycler                    0.12.1
dadaptation               3.1
diffusers                 0.25.0
docker-pycreds            0.4.0
easygui                   0.98.3
einops                    0.7.0
entrypoints               0.4
fastapi                   0.95.1
ffmpy                     0.4.0
filelock                  3.16.1
flatbuffers               24.3.25
fonttools                 4.54.1
frozenlist                1.5.0
fsspec                    2024.10.0
ftfy                      6.1.1
gitdb                     4.0.11
GitPython                 3.1.43
google-auth               2.36.0
google-auth-oauthlib      0.4.6
gradio                    3.44.2
gradio_client             0.5.0
grpcio                    1.67.1
h11                       0.14.0
httpcore                  0.17.3
httpx                     0.24.1
huggingface-hub           0.24.5
humanfriendly             10.0
idna                      3.10
imagesize                 1.4.1
importlib_metadata        8.5.0
importlib_resources       6.4.5
Jinja2                    3.1.4
jsonschema                4.23.0
jsonschema-specifications 2024.10.1
kiwisolver                1.4.7
library                   0.0.0       E:\lora-scripts\scripts\stable
lightning-utilities       0.11.8
lion-pytorch              0.1.2
lycoris_lora              2.1.0.post3
Markdown                  3.7
markdown-it-py            3.0.0
MarkupSafe                2.1.5
matplotlib                3.9.2
mdurl                     0.1.2
mpmath                    1.3.0
multidict                 6.1.0
networkx                  3.4.2
numpy                     1.26.4
oauthlib                  3.2.2
onnxruntime               1.18.1
onnxruntime-gpu           1.20.0
open-clip-torch           2.20.0
opencv-python             4.8.1.78
orjson                    3.10.11
packaging                 24.1
pandas                    2.2.3
pillow                    10.4.0
pip                       24.3.1
prodigyopt                1.0
propcache                 0.2.0
protobuf                  3.19.6
psutil                    6.1.0
pyasn1                    0.6.1
pyasn1_modules            0.4.1
pydantic                  1.10.19
pydantic_core             2.23.4
pydub                     0.25.1
Pygments                  2.18.0
pyparsing                 3.2.0
pyreadline3               3.5.4
python-dateutil           2.9.0.post0
python-multipart          0.0.12
pytorch-lightning         1.9.0
pytz                      2024.2
PyYAML                    6.0.2
referencing               0.35.1
regex                     2024.11.6
requests                  2.32.3
requests-oauthlib         2.0.0
rich                      13.7.0
rpds-py                   0.21.0
rsa                       4.9
ruff                      0.7.2
safehttpx                 0.1.1
safetensors               0.4.4
schedulefree              1.2.7
scipy                     1.14.1
semantic-version          2.10.0
sentencepiece             0.2.0
sentry-sdk                2.18.0
setproctitle              1.3.3
setuptools                75.3.0
shellingham               1.5.4
six                       1.16.0
smmap                     5.0.1
sniffio                   1.3.1
starlette                 0.26.1
sympy                     1.13.1
tensorboard               2.10.1
tensorboard-data-server   0.6.1
tensorboard-plugin-wit    1.8.1
timm                      1.0.11
tokenizers                0.19.1
toml                      0.10.2
tomlkit                   0.12.0
toolz                     1.0.0
torch                     2.5.1
torchmetrics              1.5.1
torchvision               0.20.1
tqdm                      4.67.0
transformers              4.44.0
typer                     0.12.5
typing_extensions         4.12.2
tzdata                    2024.2
urllib3                   2.2.3
uvicorn                   0.22.0
voluptuous                0.13.1
wandb                     0.16.2
wcwidth                   0.2.13
websockets                11.0.3
Werkzeug                  3.1.2
wheel                     0.44.0
yarl                      1.17.1
zipp                      3.20.2

这里记住我的onnxruntime-gpu版本:

onnxruntime-gpu           1.20.0

然后运行gui.py后,在控制台有以下输出

17:22:57-164966 INFO     Package wrong version: onnxruntime-gpu 1.20.0 required 1.18.1
17:22:57-165965 INFO     uninstalling wrong onnxruntime version
Installing onnxruntime
Found existing installation: onnxruntime 1.18.1
Uninstalling onnxruntime-1.18.1:
  Successfully uninstalled onnxruntime-1.18.1
Installing onnxruntime
Found existing installation: onnxruntime-gpu 1.20.0
Uninstalling onnxruntime-gpu-1.20.0:
  Successfully uninstalled onnxruntime-gpu-1.20.0

它替我卸载了1.20.0的版本,这会导致反推模型无法正常运行 我已经测试过了,适配我系统环境的onnxruntime-gpu版本应该是1.20.0才对,有没有什么启动指令跳过这个检查?

waterminer commented 2 weeks ago

行了,我自己解决了,用--skip-prepare-onnxruntime跳过检查就行