vladmandic / automatic

SD.Next: Advanced Implementation of Stable Diffusion and other Diffusion-based generative image models
https://github.com/vladmandic/automatic
GNU Affero General Public License v3.0
5.71k stars 425 forks source link

[Issue]: Launching server on Windows 11 returns an error #100

Closed Nem-z closed 1 year ago

Nem-z commented 1 year ago

Issue Description

Greetings,

I just tried to launch the server via webui.bat on Windows 11 after seeing the last commit and, sadly, it doesn't seem to launch. The version from the main repo is working as intended.

I've done a git clone on a new folder to start clean and just tried to launch webui.bat and here is the log I'm getting:

Creating venv in directory G:\StableDiffusion\WebUI2\venv using python "C:\Users[redacted]\AppData\Local\Programs\Python\Python310\python.exe" venv "G:\StableDiffusion\WebUI2\venv\Scripts\Python.exe" Python 3.10.6 on Windows Running setup Installing requirements Traceback (most recent call last): File "G:\StableDiffusion\WebUI2\launch.py", line 87, in setup.run_setup(False) File "G:\StableDiffusion\WebUI2\setup.py", line 334, in run_setup install_requirements() File "G:\StableDiffusion\WebUI2\setup.py", line 273, in install_requirements install(line) File "G:\StableDiffusion\WebUI2\setup.py", line 86, in install if not installed(package): File "G:\StableDiffusion\WebUI2\setup.py", line 59, in installed version = pkg_resources.get_distribution(p[0]).version File "G:\StableDiffusion\WebUI2\venv\lib\site-packages\pkg_resources__init.py", line 478, in get_distribution dist = get_provider(dist) File "G:\StableDiffusion\WebUI2\venv\lib\site-packages\pkg_resources__init__.py", line 354, in get_provider return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0] File "G:\StableDiffusion\WebUI2\venv\lib\site-packages\pkg_resources\init.py", line 909, in require needed = self.resolve(parse_requirements(requirements)) File "G:\StableDiffusion\WebUI2\venv\lib\site-packages\pkg_resources\init__.py", line 795, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'addict' distribution was not found and is required by the application Press any key to continue . . .

It's my very first issue report on GitHub, so if something is missing I will gladly provide more information or doing some more test.

See my specs below.

Platform Description

Windows 11 22H2 build 22621 Python 3.10.6 Git 2.40.0

bullseyepsa commented 1 year ago

I'm having similar issues on Windows 10, slightly different errors: D:\SDVlad\automatic>webui.bat venv "D:\SDVlad\automatic\venv\Scripts\Python.exe" Python 3.10.6 on Windows Running setup Installing requirements Traceback (most recent call last): File "D:\SDVlad\automatic\launch.py", line 87, in setup.run_setup(False) File "D:\SDVlad\automatic\setup.py", line 334, in run_setup install_requirements() File "D:\SDVlad\automatic\setup.py", line 273, in install_requirements install(line) File "D:\SDVlad\automatic\setup.py", line 86, in install if not installed(package): File "D:\SDVlad\automatic\setup.py", line 59, in installed version = pkg_resources.get_distribution(p[0]).version File "D:\SDVlad\automatic\venv\lib\site-packages\pkg_resources__init.py", line 478, in get_distribution dist = get_provider(dist) File "D:\SDVlad\automatic\venv\lib\site-packages\pkg_resources__init__.py", line 354, in get_provider return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0] File "D:\SDVlad\automatic\venv\lib\site-packages\pkg_resources\init.py", line 909, in require needed = self.resolve(parse_requirements(requirements)) File "D:\SDVlad\automatic\venv\lib\site-packages\pkg_resources\init__.py", line 795, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'addict' distribution was not found and is required by the application Press any key to continue . . .

D:\SDVlad\automatic>setup.py 11:03:02-481202 INFO Python 3.10.6 on Windows 11:03:02-485200 INFO Running setup 11:03:02-486200 INFO Installing requirements 11:03:02-714200 INFO Version: 910f047c Wed Apr 12 12:51:11 2023 -0400 11:03:03-130391 WARNING Latest available version: 2023-04-12T16:51:11Z 11:03:03-132603 INFO Updating Wiki 11:03:04-787536 INFO Installing packages ┌───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────┐ │ D:\SDVlad\automatic\setup.py:344 in │ │ │ │ 343 if name == "main": │ │ > 344 run_setup() │ │ 345 set_environment() │ │ │ │ D:\SDVlad\automatic\setup.py:336 in run_setup │ │ │ │ 335 check_version() │ │ > 336 install_packages() │ │ 337 install_repositories() │ │ │ │ D:\SDVlad\automatic\setup.py:174 in install_packages │ │ │ │ 173 install(openclip_package) │ │ > 174 install(f'--no-deps {xformers_package}') │ │ 175 │ │ │ │ D:\SDVlad\automatic\setup.py:86 in install │ │ │ │ 85 │ │ > 86 if not installed(package): │ │ 87 pip(f"install --upgrade {package}") │ │ │ │ D:\SDVlad\automatic\setup.py:59 in installed │ │ │ │ 58 ok = ok and spec is not None │ │ > 59 version = pkg_resources.get_distribution(p[0]).version │ │ 60 if ok and len(p) > 1: │ │ │ │ C:\Users\padler\AppData\Local\Programs\Python\Python310\lib\site-packages\pkg_resources__init.py:526 in │ │ get_distribution │ │ │ │ 525 if isinstance(dist, Requirement): │ │ > 526 dist = get_provider(dist) │ │ 527 if not isinstance(dist, Distribution): │ │ │ │ C:\Users\padler\AppData\Local\Programs\Python\Python310\lib\site-packages\pkg_resources__init__.py:398 in │ │ get_provider │ │ │ │ 397 if isinstance(moduleOrReq, Requirement): │ │ > 398 return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0] │ │ 399 try: │ │ │ │ C:\Users\padler\AppData\Local\Programs\Python\Python310\lib\site-packages\pkg_resources\init.py:966 in require │ │ │ │ 965 """ │ │ > 966 needed = self.resolve(parse_requirements(requirements)) │ │ 967 │ │ │ │ C:\Users\padler\AppData\Local\Programs\Python\Python310\lib\site-packages\pkg_resources\init.py:827 in resolve │ │ │ │ 826 │ │ > 827 dist = self._resolve_dist( │ │ 828 req, best, replace_conflicting, env, installer, required_by, to_activate │ │ │ │ C:\Users\padler\AppData\Local\Programs\Python\Python310\lib\site-packages\pkg_resources\init__.py:868 in │ │ _resolve_dist │ │ │ │ 867 requirers = required_by.get(req, None) │ │ > 868 raise DistributionNotFound(req, requirers) │ │ 869 to_activate.append(dist) │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ DistributionNotFound: The 'xformers' distribution was not found and is required by the application

devioa commented 1 year ago

same with you

vladmandic commented 1 year ago

regarding xformers

i've just marked xformers as optional in setup, so that should not cause critical issues anymore. i need recommendation from windows expert on what is the best version to search for when installing xformers on windows - its clearly not the same as linux.

regarding addict - that is standard library present on all platforms for ages, i see no reason why it should fail. can you try installing it manually and see what happens? btw, that requirement is required by controlnet and is out of my control.

vladmandic commented 1 year ago

how about pip install -U addict (also from venv)?

Nem-z commented 1 year ago

I just tried to do a pip install addict in venv as follow:

PS G:\StableDiffusion\WebUI2> ./venv/scripts/activate (venv) PS G:\StableDiffusion\WebUI2> pip install addict Collecting addict Using cached addict-2.4.0-py3-none-any.whl (3.8 kB) Installing collected packages: addict Successfully installed addict-2.4.0

[notice] A new release of pip available: 22.2.1 -> 23.0.1 [notice] To update, run: python.exe -m pip install --upgrade pip

Then the webui.bat gave me an aenum error so I did a pip install aenum for this as well. Then it gave me an aiohttp error and then an anyio error and so on. Maybe the webui.bat file need to install some kind of dependencies on first launch but fail to do so for some reasons?

vladmandic commented 1 year ago

it should install everything from requirements.txt - i'll check why it doesn't. in the meantime, you can run pip -r requirements.txt from venv.

btw, workflow should be webui.bat -> launch.py -> setup.py -> launch.py -> webui.py. seems like on windows, some steps are getting skipped.

Nem-z commented 1 year ago

Manually running pip install -r ./requirements.txt seems to have downloaded dependencies and I can now progress further in the launch sequence but there are still some issues.

Now, I have another error: The extensions doesn't seems to install if I understand correctly. Here is the log (screenshots because of formatting issue): 1 2

AnAIGuy commented 1 year ago

I am also getting the missing 'addict' problem on Windows 10 running the webui.bat venv "D:\automatic\venv\Scripts\Python.exe" Python 3.10.6 on Windows Running setup Installing requirements Traceback (most recent call last): File "D:\automatic\launch.py", line 87, in <module> setup.run_setup(False) File "D:\automatic\setup.py", line 334, in run_setup install_requirements() File "D:\automatic\setup.py", line 273, in install_requirements install(line) File "D:\automatic\setup.py", line 86, in install if not installed(package): File "D:\automatic\setup.py", line 59, in installed version = pkg_resources.get_distribution(p[0]).version File "D:\automatic\venv\lib\site-packages\pkg_resources\__init__.py", line 478, in get_distribution dist = get_provider(dist) File "D:\automatic\venv\lib\site-packages\pkg_resources\__init__.py", line 354, in get_provider return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0] File "D:\automatic\venv\lib\site-packages\pkg_resources\__init__.py", line 909, in require needed = self.resolve(parse_requirements(requirements)) File "D:\automatic\venv\lib\site-packages\pkg_resources\__init__.py", line 795, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'addict' distribution was not found and is required by the application Press any key to continue . . .

Woisek commented 1 year ago

you can run pip -r requirements.txt from venv.

I:\Super SD 2.0\automatic>pip -r requirements.txt

Usage: pip [options]

no such option: -r

I:\Super SD 2.0\automatic> 😌

Renaldas111 commented 1 year ago

Opened a new issue regarding this PermissionError on "setup.log", I faced the same issue. Looks all these extensions are not installed.

Razunter commented 1 year ago

no such option: -r

start cmd in venv/scripts/, launch activate.bat first, then

cd ../..
pip install -r requirements.txt

Still doesn't work, though. I've installed open_clip_torch and clip manually, but getting "Cannot install xformers package", "Torch not compiled with CUDA enabled" and "No module named 'basicsr.version'"

bullseyepsa commented 1 year ago

Yeah, at least on Windows, you need the full command as Razunter has it above. I had run it without activating the virtual environment and, while i was able to get it to launch after git pull this morning, it still threw up the errors Nem-Z is getting.

bullseyepsa commented 1 year ago

After re-running the pip install -r requirements.text both in and out of the virtual environment, here's what I get when I run .\launch.py (it does launch and I can generate images, though I haven't tested any functionality beyond launching and hitting generate) 13:21:57-712225 INFO Python 3.10.6 on Windows 13:21:57-716226 INFO Running setup 13:21:57-723227 INFO Installing requirements 13:21:57-949225 INFO Version: f46fa099 Wed Apr 12 14:55:46 2023 -0400 13:21:58-352458 WARNING Latest available version: 2023-04-12T18:55:46Z 13:21:58-354457 INFO Updating Wiki 13:21:59-990911 INFO Installing packages 13:22:00-032907 ERROR Cannot install xformers package: {e} 13:22:00-034908 INFO Installing repositories 13:22:00-235909 INFO Installing submodules 13:22:01-097946 INFO Updating submodules 13:22:13-262412 INFO Built-in extensions: ['clip-interrogator-ext', 'LDSR', 'Lora', 'prompt-bracket-checker', 'ScuNET', 'sd-dynamic-thresholding', 'sd-extension-aesthetic-scorer', 'sd-extension-steps-animation', 'sd-extension-system-info', 'sd-webui-controlnet', 'sd-webui-model-converter', 'seed_travel', 'stable-diffusion-webui-images-browser', 'stable-diffusion-webui-rembg', 'SwinIR'] 13:22:14-087401 ERROR Error running extension installer: Traceback (most recent call last): File "D:\SDVlad\automatic\extensions-builtin\clip-interrogator-ext\install.py", line 1, in

import launch File "D:\SDVlad\automatic\launch.py", line 5, in import setup File "D:\SDVlad\automatic\setup.py", line 22, in os.remove('setup.log') PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'setup.log' 13:22:20-760295 ERROR Error running extension installer: Traceback (most recent call last): File "D:\SDVlad\automatic\extensions-builtin\sd-extension-system-info\install.py", line 1, in import launch File "D:\SDVlad\automatic\launch.py", line 5, in import setup File "D:\SDVlad\automatic\setup.py", line 22, in os.remove('setup.log') PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'setup.log' 13:22:21-600762 ERROR Error running extension installer: Traceback (most recent call last): File "D:\SDVlad\automatic\extensions-builtin\sd-webui-controlnet\install.py", line 1, in import launch File "D:\SDVlad\automatic\launch.py", line 5, in import setup File "D:\SDVlad\automatic\setup.py", line 22, in os.remove('setup.log') PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'setup.log' 13:22:23-128911 ERROR Error running extension installer: Traceback (most recent call last): File "D:\SDVlad\automatic\extensions-builtin\seed_travel\install.py", line 1, in import launch File "D:\SDVlad\automatic\launch.py", line 5, in import setup File "D:\SDVlad\automatic\setup.py", line 22, in os.remove('setup.log') PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'setup.log' 13:22:23-982658 ERROR Error running extension installer: Traceback (most recent call last): File "D:\SDVlad\automatic\extensions-builtin\stable-diffusion-webui-images-browser\install.py", line 1, in import launch File "D:\SDVlad\automatic\launch.py", line 5, in import setup File "D:\SDVlad\automatic\setup.py", line 22, in os.remove('setup.log') PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'setup.log' 13:22:24-834026 ERROR Error running extension installer: Traceback (most recent call last): File "D:\SDVlad\automatic\extensions-builtin\stable-diffusion-webui-rembg\install.py", line 1, in import launch File "D:\SDVlad\automatic\launch.py", line 5, in import setup File "D:\SDVlad\automatic\setup.py", line 22, in os.remove('setup.log') PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'setup.log' 13:22:25-705472 INFO Enabled extensions: ['PBRemTools', 'posex', 'sd-web-ui-kitchen-theme', '_Stable-Diffusion-Webui-Civitai-Helper'] 13:22:26-516598 ERROR Error running extension installer: Traceback (most recent call last): File "D:\SDVlad\automatic\extensions\PBRemTools\install.py", line 1, in import launch File "D:\SDVlad\automatic\launch.py", line 5, in import setup File "D:\SDVlad\automatic\setup.py", line 22, in os.remove('setup.log') PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'setup.log' 13:22:28-728262 INFO Installing requirements 13:22:28-732262 INFO Setting environment tuning 13:22:28-733262 INFO Server Arguments: ['--listen'] No module 'xformers'. Proceeding without it. C:\Users\padler\AppData\Local\Programs\Python\Python310\lib\site-packages\pytorch_lightning\utilities\distributed.py:258: LightningDeprecationWarning: `pytorch_lightning.utilities.distributed.rank_zero_only` has been deprecated in v1.8.1 and will be removed in v2.0.0. You can import it from `pytorch_lightning.utilities` instead. rank_zero_deprecation( 13:22:35-699262 INFO Torch 2.0.0+cu118 CUDA 11.8 cuDNN 8700 13:22:35-702261 INFO GPU NVIDIA GeForce RTX 3070 VRAM 8191 Arch (8, 6) Cores 46 Available models: 160 Civitai Helper: Get Custom Model Folder Error loading script: civitai_helper.py ┌───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────┐ │ D:\SDVlad\automatic\modules\scripts.py:255 in load_scripts │ │ │ │ 253 │ │ │ current_basedir = scriptfile.basedir │ │ 254 │ │ │ │ │ > 255 │ │ │ script_module = script_loading.load_module(scriptfile.path) │ │ 256 │ │ │ register_scripts_from_module(script_module) │ │ 257 │ │ │ │ D:\SDVlad\automatic\modules\script_loading.py:11 in load_module │ │ │ │ 9 │ module_spec = importlib.util.spec_from_file_location(os.path.basename(path), path) │ │ 10 │ module = importlib.util.module_from_spec(module_spec) │ │ > 11 │ module_spec.loader.exec_module(module) │ │ 12 │ │ │ 13 │ return module │ │ in exec_module:883 │ │ in _call_with_frames_removed:241 │ │ │ │ D:\SDVlad\automatic\extensions\_Stable-Diffusion-Webui-Civitai-Helper\scripts\civitai_helper.py:36 in │ │ │ │ 34 extension_path = scripts.basedir() │ │ 35 │ │ > 36 model.get_custom_model_folder() │ │ 37 setting.load() │ │ 38 │ │ │ │ D:\SDVlad\automatic\extensions\_Stable-Diffusion-Webui-Civitai-Helper\scripts\ch_lib\model.py:33 in │ │ get_custom_model_folder │ │ │ │ 31 │ global folders │ │ 32 │ │ │ > 33 │ if shared.cmd_opts.embeddings_dir and os.path.isdir(shared.cmd_opts.embeddings_dir): │ │ 34 │ │ folders["ti"] = shared.cmd_opts.embeddings_dir │ │ 35 │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ AttributeError: 'Namespace' object has no attribute 'embeddings_dir' Image Browser: send2trash is not installed. recycle bin cannot be used. Error loading script: postprocessing_rembg.py ┌───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────┐ │ D:\SDVlad\automatic\modules\scripts.py:255 in load_scripts │ │ │ │ 253 │ │ │ current_basedir = scriptfile.basedir │ │ 254 │ │ │ │ │ > 255 │ │ │ script_module = script_loading.load_module(scriptfile.path) │ │ 256 │ │ │ register_scripts_from_module(script_module) │ │ 257 │ │ │ │ D:\SDVlad\automatic\modules\script_loading.py:11 in load_module │ │ │ │ 9 │ module_spec = importlib.util.spec_from_file_location(os.path.basename(path), path) │ │ 10 │ module = importlib.util.module_from_spec(module_spec) │ │ > 11 │ module_spec.loader.exec_module(module) │ │ 12 │ │ │ 13 │ return module │ │ in exec_module:883 │ │ in _call_with_frames_removed:241 │ │ │ │ D:\SDVlad\automatic\extensions-builtin\stable-diffusion-webui-rembg\scripts\postprocessing_rembg.py:5 in │ │ │ │ 3 │ │ 4 from modules.ui_components import FormRow │ │ > 5 import rembg │ │ 6 │ │ 7 models = [ │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ ModuleNotFoundError: No module named 'rembg' Running on local URL: http://0.0.0.0:7860 To create a public link, set `share=True` in `launch()`. Loading weights: D:\SDVlad\automatic\models\Stable-diffusion\2dn_1.safetensors --------------------- 0.0/7.7 GB -:--:-- Creating model from config: D:\SDVlad\automatic\configs\v1-inference.yaml LatentDiffusion: Running in eps-prediction mode DiffusionWrapper has 859.52 M params. Applying scaled dot product cross attention optimization Textual inversion embeddings loaded(40): 80sdarkfantasysd15b, atompunkstylesd15, bad-artist-anime, bad-artist, bad-hands-5, bad-image-v2-39000, bad_prompt, bad_prompt_version2, cardstyle15, CharTurner, CharTurnerV2, dense-forest, dragon, easynegative, flame_surge_style, ghst-3000, hro, neg_facelift512, neg_realism512, ng_deepnegative_v1_75t, OldFashioned, Pirate, poly-hd, Rayne-Weynolds, realisticvision-negative-embedding, rfktr_bwmnga, rz-neg-15-foranalog, shuimo, Style-Empire-neg, Style-Empire, Style-NebMagic-neg, Style-NebMagic, Style-Necromancy, Style-Renaissance, style-widow, Unspeakable-Horrors-Composition-4v, verybadimagenegative_v1.2-3200, verybadimagenegative_v1.2-6400, vile_prompt3, vmpr Textual inversion embeddings skipped(25): 21charturnerv2, anthro, badquality, cardstylev3, dgtl, dgtlv2, embellish1, embellish2, embellish3, HyperSmoke, Kipaki-150, laxpeintV2, nartfixer, nfixer, nfixernext, nrealfixer, PaintStyle1, PaintStyle4, paintstyle5, paintstyle8, PhotoHelper, PortraitHelper, rz-neg-foranalogportrait, rz-neg-general, tarot768 Model loaded in 3.0s (load=0.6s create=0.3s apply=0.6s vae=0.7s move=0.7s embeddings=0.1s) 13:22:49-792496 INFO Startup time: 15.0s (libraries=0.9s models=0.1s codeformer=0.1s scripts=3.2s ui=3.3s gradio=4.2s checkpoint=3.2s)
Woisek commented 1 year ago

That's what I experienced, also.

Wffv9FNa commented 1 year ago

I also experience this issue on Windows 10. Steps:

  1. Cloned the repo
  2. Ran the webui.bat file which threw the error - The 'addict' distribution was not found and is required by the application
  3. Activated the venv and manually installed the requirements.txt with pip
  4. Launched webui.bat again and encountered more errors: 2023-04-12_21h37m34s
bullseyepsa commented 1 year ago

I did a little more testing and while I can still generate images, some of the extensions didn't load (though some of the ones that threw errors above do appear to have loaded but not all). Things are missing like Hires Fix, though, but I'm definitely farther along than some of the above.

I should note that I used symbolic links to redirect the models folder to the one in my OG A1111 folder so I don't have to keep up with the syntax for pointing it there, but it doesn't appear to be related to the errors I'm getting.

AssassinsLament commented 1 year ago

Yeah, wanted to try out this clone but there doesn't seem to be a clear cut install method that's working. Cloned, and ran webui.bat, same error about 'addict'. I activated the venv, and installed the requirements.txt but still can't get anything to run. I know it shouldn't be that complicated, so there must be a bug somewhere that was recently added.

bullseyepsa commented 1 year ago

Interesting. I just discovered that I can get it to fail at the missing open_clip error as [Wffv9FNa] does above if I use webui.bat, but it launches (with errors) if I use Launch.py

Razunter commented 1 year ago

Found a bug(?) in setup.py: version = pkg_resources.get_distribution(p[0]).version is called before if ok and len(p) > 1: and crashes if not ok move it inside of if ok and len(p) > 1:

import pkg_resources is called on first launch and crashes, since it's not installed yet.

Now it fails at ImportError: cannot import name 'Roboto' from 'fonts.ttf'

AlUlkesh commented 1 year ago

I just got aware of this fork. Sounds very good!

Unfortunately I also am running into install problems on Windows 10.

Here's the history-so-far:

First start of webui.bat: pkg_resources.DistributionNotFound: The 'addict' distribution was not found and is required by the application

Manually activated venv and did a pip install -r requirements.txt

Second start: ModuleNotFoundError: No module named 'open_clip'

Third start (on the theory that the second start installed something that might prevent the error on the next run):

Warning: caught exception 'Torch not compiled with CUDA enabled', memory monitor disabled
ModuleNotFoundError: No module named 'clip'

That's as far as I got.

EDIT: I got rid of the torch error, by installing it manually: https://pytorch.org/get-started/locally/ However this at first didn't work, I had to first uninstall the torch stuff. So:

pip3 uninstall torch torchvision torchaudio
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

EDIT 2: It's running! The last step was to install clip manually: pip install git+https://github.com/openai/CLIP.git

EDIT 3: To get xformers to work, this had to be resolved:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
xformers 0.0.18 requires pyre-extensions==0.0.23, which is not installed.

Which was cured by a simple: pip install xformers -U

tripletto commented 1 year ago

After your last commit it runs kinda perfectly (some errors later down the road but nothing that keeps me from generating.)

Thanks for your great work @vladmandic!

P.S.: I manually pip installed the requirements.txt while venv was active and I need to run my CMD with administrator rights on Windows 10

For some poor Google-Soul: Open CMD with administrator rights!!! cd x:\your-stable-diffusion-folder\venv\Scripts activate.bat cd ../.. <-- important to go back to the main directory, where the requirements.txt is located! pip install -r requirements.txt deactivate.bat

Woisek commented 1 year ago

EDIT 2: It's running! The last step was to install clip manually: pip install git+https://github.com/openai/CLIP.git

I did this but it still says ModuleNotFoundError: No module named 'clip' Executed in root folder. Any hints?

AlUlkesh commented 1 year ago

I did this but it still says ModuleNotFoundError: No module named 'clip' Executed in root folder. Any hints?

Did you activate the venv first?

lolxdmainkaisemaanlu commented 1 year ago

EDIT 2: It's running! The last step was to install clip manually: pip install git+https://github.com/openai/CLIP.git

I did this but it still says ModuleNotFoundError: No module named 'clip' Executed in root folder. Any hints?

Pretty sure you didn't activate the venv and did not install the clip in it. Just had this issue and realized I hadn't activated the venv.

exodia52 commented 1 year ago

Finally got it to work.

If anyone wanna try on window 10 please follow as @AlUlkesh said above.

Simpler way step by step below :

  1. Open CMD and Run As Admin
  2. Navigate to "automatic" folder by using "CD INPUT_FOLDER_PATH_HERE"
  3. Type "webui.bat"
  4. Let it cook(run) until you get an Error about "Clip" module
  5. Press Enter, It will go back to a normal CMD Admin
  6. Go to "automatic\venv\Scripts" folder using "CD INPUT_FOLDER_PATH_HERE"
  7. Activate (BE SURE YOU STILL IN ADMIN CMD) See top of your CMD taskbar name.
  8. Go back to "automatic\venv\Scripts" by using CD
  9. pip install git+https://github.com/openai/CLIP.git
  10. Let it cook again
  11. Then run the "Webui.bat" again
  12. New problem that says "Torch using CPU"
  13. Close the CMD
  14. Open again Admin CMD
  15. Go to "automatic\venv\Scripts" folder Again
  16. Activate Again
  17. pip3 uninstall torch torchvision torchaudio
  18. pip install xformers -U
  19. pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
  20. Navigate to "automatic" folder by using "CD INPUT_FOLDER_PATH_HERE" Again
  21. Run Webui.bat

Now you are done. Congratz. Go to your main Automatic folder and run the Webui.bat again and it will launch.

Thank you so much @AlUlkesh for trying to keep us updated on how to solve this maze.

My experience with this Repo below (Can skip if u don't want to know) :

The speed i'm getting is really on par with Automatic1111 which is around 6.34-3.04it/s with 3060 Ti 8GB Vram. I'm not fully check if there's anything wrong yet. I can run Generate image and change my Model really fast which is really good. The UI is not as heavy as Automatic1111 for my experience atm.

vladmandic commented 1 year ago

Guys, I appreciate all community troubleshooting efforts!

I've just finished major update to installer/launcher as well as some environment auto-tunes.
Hopefully now those steps should not be needed and should work out-of-the-box

Check README for updated notes and updated thread #92 with details. I'm going to close this issue for now, lets start with a new issue if there is something remaining.

Woisek commented 1 year ago

Did you activate the venv first?

Yes, I had it activated because (venv) was written besides the folder name.