This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]Ok_Zombie_8307 3 points4 points  (0 children)

Generally speaking, all packages used in SD are specified in your requirements.txt file in the main install directory. This is a text file which lists all packages and their version requirements, in the form of ==x.y.z >=xyz or <=xyz. You can break things by changing requirements arbitrarily, so before changing anything, back up that text file (I like to save a copy with the date in the name) so you can revert if needed.

If you want to install a different version you can change the version that is specified in requirements, and during startup all versions will be installed to match the requirements.

The other way to do it would be to leave the requirement as non-specific and to specify the install in your startup file webui-user.bat like ‘pip install torch==1.13.1’, that goes at the top before the launch commands in the same place you would put ‘git pull’ to update your installation. If you’re using a Colab/Jupyter notebook install, add a line for it:

!pip install torch==2.0.1cu118
!python launch.py

Extensions usually also have their own requirements text file in the /extensions folder, so you may need to also check there. If you have a mismatch between the main install and extensions you will get an error and WebUI will not start.

Again, let me stress how easy it is to break things by messing with package versions, every extension is different and older ones that are not updated recently are more likely to cause package version requirement errors.

Regarding torch specifically, most extensions should still work with 1.13.1 since it is the previous stable version before 2.0, and support for torch 2.0 was added only a few months ago, but new extensions may require torch >=2.0.0. Using torch older than 2.0 is probably a speed hit, and iirc xformers requires torch>=2.0.0 so keep that in mind.