From 4ae1883e376b71033c6ecc6874421bac4b86d59d Mon Sep 17 00:00:00 2001 From: Vir Chaudhury Date: Sat, 15 Apr 2023 08:33:36 +0800 Subject: [PATCH] feat: xformers support --- README.md | 6 ++++++ impl.nix | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1d59bac..8e7ea62 100644 --- a/README.md +++ b/README.md @@ -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). diff --git a/impl.nix b/impl.nix index 593afe0..9279fb7 100644 --- a/impl.nix +++ b/impl.nix @@ -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"; }