santa hat
deerdeer nosedeer glow
Sign In

So you fucked up and did a git pull in A1111...

So you fucked up and did a git pull in A1111...

So you fucked up and did a git pull on A1111 and nothing works? Now it only gives you 10000 dependency errors? Then this guide is for you! Also unless you are a beginner, you are likely looking for step 6 of the hard route to a clone my environment.

Edit 20240502: Updated attached requirement file. Remember it is for nvidia gpus. windows, torch 2.3.0, cuda 12.1, python 3.10. It also has transparent background and lama cleaner embedded in.

Community service

Easily opening powershell

You can easily open a powershell window on a folder by doing a ctrl+shit+left click on a folder and selecting open powershell window here. That way you don't have to navigate there via cd.

Easily opening venv

After opening powershell in the scripts folder with the method above, simply type ".\activate" without the quotes of course and you will be inside your venv.

Git manager

First of all get yourself a git manager, don't be a barbarian who ends up using the git command line for a simple pull. That shit if for when git eats one of your stashes and you are trying to search for the reference id to restore it, not for day to day usage.

I highly recommend tortoise git https://tortoisegit.org/ it has served me faithfully for almost a decade.

This is how normal people do a git pull:

Lama cleaner

I added a zip file with a small powershell script for Lama cleaner. Just dump it in your a1111 root folder next to webui-user.bat and you can open it using right click to activate Lama cleaner which you can use at http://localhost:8080/

The Easy route

Well follow the next steps:

  1. If you have automatic pull enabled in webui-user.bat disable it.

  2. If you have a good enough internet connection and don't mind the waits simply delete the venv folder and launch A1111 again, all dependencies will be correctly downloaded.

  3. End

Just kidding... mostly.

If you don't have a good internet connection or are feeling adventurous:

The hard route

For when you don't want to redownload everything and or wish to experiment with newer versions of the requirements.

  1. Open a power shell or cmd move to your Scripts folders (stable-diffusion-webui\venv\Scripts) and execute either Activate.ps1 or Activate.bat depending on if you used ps or cmd(bat is for cmd). To run Activate.ps1 you can type .\Activate.

  2. Type pip list and it will give you all the dependencies you have installed.

  3. Compare them against Requirements.txt, requirements_versions.txt, requirements-test.txt

  4. Update packages that require it by using pip Install -U packagename==version (like pip install -U accelerate==0.19) (the -U is case sensitive)

  5. Update torch by using either pip or pip3 (both work exactly the same for most purposes)

    1. For nvidia: pip3 install -U torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 for cuda 12.1. Replace the cu121 for cu118, cu117 or the one you need if an older cuda version.

    2. For cpu only: pip3 install -U torch torchvision torchaudio

    3. For Ati(linux only): pip3 install -U torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm5.4.2

  6. Alternatively you can copy an environment, to do that first activate your environment then just go to where the file you wish to install is(or put the file wherever the activate files are) and do: install -r requirements.txt
    I will upload my current environment be warned it is for windows 10, cuda 121, python 3.10 also be warned i might have some extra crap in there(transparent background and Lama cleaner).

The why am i doing this to myself route

For when you need to locally download the stuff for reasons like installing in a closed system without internet access.

  1. Repeat steps 1 to 3 from the previous route.

  2. Python packages are called wheel files they end in .whl.

  3. Download the necessary wheel files. remember that cuda enabled dependencies say cu118 or cu117. Cp-something like cp310 means the wheel file is for python 3.10.

  4. For example the following repository contains torch wheels https://download.pytorch.org/whl/torch_stable.html suppose you are on windows 64 bits on cuda 121 and python 3.10 as is the standard for A1111 and you want the latest Torch(as of the creation of this guide 2.3.0). The file you want is: cu121/torch-2.3.0%2Bcu121-cp310-cp310-win_amd64.whl

  5. Install the wheel directly by using: pip install http://websiteurl.com/filename.whl
    or in case you already downloaded it: pip install C:/some-dir/some-file.whl

  6. Now go forth and do it by hand for every one of your missing dependencies! You will have to look for each one of them in the internet.

Now you may be asking yourself what does the main image has to do with anything, to which the answer is I that like pretty ladies with huge boobs.

57

Comments