Giter Site home page Giter Site logo

automatic1111-webui-nix's Introduction

AUTOMATIC1111/stable-diffusion-webui for CUDA and ROCm on NixOS

This is literally just a shell.nix/flake.nix for stable-diffusion-webui that also enables CUDA/ROCm on NixOS. This supports NVIDIA GPUs (using CUDA), AMD GPUs (using ROCm), and CPU compute (including Apple silicon).

Usage

Setup

First, run:

git clone https://github.com/virchau13/automatic1111-webui-nix
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
cp automatic1111-webui-nix/*.nix stable-diffusion-webui/
cd stable-diffusion-webui
git add *.nix

After that, choose the command according to your platform:

Flakes

nix develop .#cpu # CPU or Apple silicon
nix develop .#cuda # CUDA
nix develop .#rocm # ROCm

Non-flakes

nix-shell --argstr variant CPU # CPU
nix-shell --argstr variant CUDA # CUDA
nix-shell --argstr variant ROCM # ROCm

Launching webui

cd automatic1111-webui-nix
./webui.sh
# follow the tutorials at the original project for setting up Stable Diffusion / GFPGAN / whatever

You might want to switch to high performance mode on battery-powered devices.

Is this completely pure?

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-webui-nix's People

Contributors

virchau13 avatar rprospero avatar cloudef avatar quag avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.