stable-diffusion-webui-forge icon indicating copy to clipboard operation
stable-diffusion-webui-forge copied to clipboard

[BUG] LORA reload button missed

Open kalle07 opened this issue 1 year ago • 14 comments

LORA reload button missed SEARCH option missed an d all images gone

kalle07 avatar Aug 28 '24 15:08 kalle07

I don't see that on latest, which commit are you on?

wcole3 avatar Aug 28 '24 18:08 wcole3

snip01

Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] Version: f2.0.1v1.10.1-previous-456-g0abb6c46 Commit hash: 0abb6c4686efbc7521b2bf8a6f06eba18d0b6ada

kalle07 avatar Aug 29 '24 07:08 kalle07

SRY it depend on sd-webui-faceswaplab that was not correctly installed, (i delteted it from folder) now all is fine, strange...

btw, you know how i active the environment on windows if i have installed it from the selfinstaller ZiP ?

kalle07 avatar Aug 29 '24 07:08 kalle07

Happy to hear it was just an extension. The environment.bat\sh file initializes the python environment, it has options to change if you'd prefer a venv.

wcole3 avatar Aug 29 '24 11:08 wcole3

...

sry the environment.bat ? it only set but do not activate anything not in CMD and not in conda ?

@echo off

set DIR=%~dp0system

set PATH=%DIR%\git\bin;%DIR%\python;%DIR%\python\Scripts;%PATH% set PY_LIBS=%DIR%\python\Scripts\Lib;%DIR%\python\Scripts\Lib\site-packages set PY_PIP=%DIR%\python\Scripts set SKIP_VENV=1 set PIP_INSTALLER_LOCATION=%DIR%\python\get-pip.py set TRANSFORMERS_CACHE=%DIR%\transformers-cache

kalle07 avatar Aug 29 '24 12:08 kalle07

Correct, the script only initializes the shell it is run in with the environment. It is initializing the environment through manually setting up the listed variables to the paths in the 'system' folder that the installer created. If you want a venv to be created you can look at the SKIP_VENV variable and the corresponding logic in webui/webui.bat\sh.

When SKIP_VENV is not true, a venv folder will be created in the webui folder, and you can activate it as you would normally for a virtual environment.

wcole3 avatar Aug 29 '24 12:08 wcole3

sry iam only a bit in that but i have no activate.bat like usual in the install folder under scripts better i ask where is the standart environment installed if i used the zip-installer ? and what shoud i acitivate (name)

kalle07 avatar Aug 29 '24 13:08 kalle07

If I understand what you're trying to do; i.e. create a venv you can activate, you would do:

  1. Edit environment.bat to the following: image
  • This tells forge to create a virtual environment and to use your System's python instead of the python in the 'system' folder
  1. Run run.bat this may take some time to install all the requirements, but at the end you will have a "webui/venv" folder at the end.
  2. You can activate the environment by running .\venv\Scripts\activate.bat that environment with have versions corresponding to the versions in the requirements.txt scattered around the project. image

Is that what you were trying to do?

wcole3 avatar Aug 29 '24 14:08 wcole3

thx for fast answer ... in principle yes... but i have already installed webforge (all standart without skip venv=0) so if i must install an extension manualy (pip install -r req.txt) it requires envrionment ... So would that be okay, as you described it?

kalle07 avatar Aug 29 '24 15:08 kalle07

If you create a venv as above, and then install the requirements in an activated shell the modules will populate the venv area. In the default install environment, they are installed in system folder.

If you have an extension that has a requirments.txt, typically there will be an install.py file that is reasonable for making sure those requirements are installed. The webui/extensions-builtin/sd_forge_controlnet extension might be a good example of how that process works.

wcole3 avatar Aug 29 '24 16:08 wcole3

i see

@echo off

set DIR=%~dp0system

set PATH=%DIR%\git\bin;%DIR%\python;%DIR%\python\Scripts;%PATH% set PY_LIBS=%DIR%\python\Scripts\Lib;%DIR%\python\Scripts\Lib\site-packages set PY_PIP=%DIR%\python\Scripts set SKIP_VENV=0 set PIP_INSTALLER_LOCATION=%DIR%\python\get-pip.py set TRANSFORMERS_CACHE=%DIR%\transformers-cache

in cmd ... run.bat ... e:\WebUI_Forge>run.bat Creating venv in directory e:\WebUI_Forge\webui\venv using python "e:\WebUI_Forge\system\python\python.exe" Unable to create venv in directory "e:\WebUI_Forge\webui\venv"

exit code: 1

stderr: e:\WebUI_Forge\system\python\python.exe: No module named venv

hmmm?!? ... maybe i'll leave it with the extension?!? but its "sd-webui-faceswaplab"

usualy with other git stuff i creat manualy an venv or conda but with this automatic - installer i thought all is running simple ;)

kalle07 avatar Aug 29 '24 16:08 kalle07

See the commented lines my environment.bat above (lines 5, 6,7, and 9), they are missing in your version.

If I clone that extension into the extensions folder, I see the requirements install as expected during startup; however, there are other startup errors from the extensions that you'll have to discuss with the extension developer.

wcole3 avatar Aug 29 '24 17:08 wcole3

all same error if i @rem all these lines ...

i leave it ... ;) thx

kalle07 avatar Aug 29 '24 17:08 kalle07

@kalle07 Please close the issue as it seems your environment is fine now.

bkosowski avatar Sep 15 '24 11:09 bkosowski