feat: xformers support

This commit is contained in:
Vir Chaudhury 2023-04-15 08:33:36 +08:00
parent abe8d3ed96
commit 4ae1883e37
No known key found for this signature in database
GPG Key ID: 25B242ED74B61B15
2 changed files with 11 additions and 2 deletions

View File

@ -22,6 +22,12 @@ You might want to switch to high performance mode on battery-powered devices.
This is just a Nix shell for bootstrapping the web UI, not an actual pure flake; the `./webui.sh` will still install
a bunch of Python packages (into a venv, so not polluting your system) when you run it.
## Troubleshooting
### xformers
Run `./webui.sh --xformers` to set up xformers. If this command fails, try git pulling from the source repository, then deleting the venv (`rm -r venv`) and reinstalling everything from scratch again (sometimes the venv will keep old packages around forever even if they should be updated.)
## Credits
- AUTOMATIC1111 for obvious reasons.
- rprospero for [ROCm support](https://github.com/virchau13/automatic1111-webui-nix/pull/3).

View File

@ -13,6 +13,9 @@ let
xorg.libXv
xorg.libXrandr
zlib
# for xformers
gcc
] else [
rocm-runtime
pciutils
@ -33,8 +36,8 @@ pkgs.mkShell rec {
procps gnumake util-linux m4 gperf unzip
libGLU libGL
glib
];
LD_LIBRARY_PATH=pkgs.lib.makeLibraryPath buildInputs;
];
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
CUDA_PATH = pkgs.lib.optionalString isCUDA pkgs.cudatoolkit;
EXTRA_LDFLAGS = pkgs.lib.optionalString isCUDA "-L${pkgs.linuxPackages.nvidia_x11}/lib";
}