Trojaner/text-generation-webui-stable_diffusion

ModuleNotFoundError: No module named 'webuiapi'

Zedtec opened this issue · 1 comments

Zedtec commented

I am getting the above error, can you help me fix this ?

related: #3

i realized the error was due to text-generation-webui using a different venv.
i modified stable_diffusion/script.py, inserting at the top

import sysconfig
print(sysconfig.get_paths()["purelib"])

and quickly realized it was loading modules from text-generation-webui/installer_files/env.

this also appears when i look at conda venvs

~/text-generation-webui$ conda env list
# conda environments:
#
base                  *  /home/user/miniconda3
textgen                  /home/user/miniconda3/envs/textgen
                         /home/user/text-generation-webui/installer_files/conda
                         /home/user/text-generation-webui/installer_files/env

so the solution in my case was to run

conda activate installer_files/env
python3 -m pip install -r extensions/stable_diffusion/requirements.txt
conda activate textgen