stable-diffusion-nix icon indicating copy to clipboard operation
stable-diffusion-nix copied to clipboard

JupyterLab Flake for Stable Diffusion

ARCHIVED

This repository is now no longer being maintained. The huggingface library diffusers is now included in nixpkgs.

Stable Diffusion with Nix

NixOS
Unstable

Quickly get up and running using Stable Diffusion with Nix flakes.

Requirements

  • Nix
  • Nvidia GPU (3.2GB VRAM)
  • x86_64 Linux

Setup

  1. Enable flakes by editing either ~/.config/nix/nix.conf or /etc/nix/nix.conf and add
experimental-features = nix-command flakes
  1. Use nix run --impure github:collinarnett/stable-diffusion-nix#jupyterLab to spawn a Jupyter Lab instance. The --impure flag allows nixGL to find your Nvidia drivers on non-nixos systems.

  2. Replace YOUR_TOKEN_HERE with your HuggingFace token and make sure to accept the License Agreement for Stable Diffusion.

  3. Execute the cells in stable-diff.ipynb to generate images.

Enjoy!

image