bmaltais / kohya_ss

Apache License 2.0
9.54k stars 1.23k forks source link

ModuleNotFoundError: No module named 'library' #1340

Closed michaeltran33 closed 8 months ago

michaeltran33 commented 1 year ago

Directory library and file library.model_util.py exist. However, error persist. Please help.

←[1;33m============================================================= Modules installed outside the virtual environment were found. This can cause issues. Please review the installed modules.

You can uninstall all local modules with:

←[1;34mdeactivate pip freeze > uninstall.txt pip uninstall -y -r uninstall.txt ←[1;33m=============================================================←[0m

08:20:48-563805 INFO Version: v21.8.6

08:20:48-575804 INFO nVidia toolkit detected 08:20:49-330804 INFO Torch 2.0.1+cu118 08:20:49-344804 INFO Torch backend: nVidia CUDA 11.8 cuDNN 8700 08:20:49-346806 INFO Torch detected GPU: NVIDIA GeForce RTX 3060 VRAM 12288 Arch (8, 6) Cores 28 08:20:49-347804 INFO Verifying modules instalation status from requirements_windows_torch2.txt... 08:20:49-348804 INFO Verifying modules instalation status from requirements.txt... 08:20:50-711102 INFO headless: False 08:20:50-715102 INFO Load CSS... Running on local URL: http://127.0.0.1:7861

To create a public link, set share=True in launch(). 08:46:37-022732 INFO ./venv/Scripts/python.exe "networks\extract_lora_from_models.py" --save_precision float --save_to "D:/stable-diffusion-webui/models/Stable-diffusion/lofi.safetensors" --model_org "D:/stable-diffusion-webui/models/Stable-diffusion/v1-5-pruned.safetensors" --model_tuned "D:/stable-diffusion-webui/models/Stable-diffusion/AModel/lofiEVERYTHINGV1.safetensors" --dim 128 --device cuda --conv_dim 128 --clamp_quantile 1.0 --min_diff 0.01 Traceback (most recent call last): File "D:\kohya_ss\networks\extract_lora_from_models.py", line 11, in import library.model_util as model_util ModuleNotFoundError: No module named 'library'

michaeltran33 commented 1 year ago

fixed it by, removed python 10.10. installed python 10.9. reinstalled kohya_ss.

yunkchen commented 1 year ago

let's try add this code into _kohya_ss\networks\extract_lora_frommodels.py import sys sys.path.append('./')