Coder Social home page Coder Social logo

nix-stable-diffusion's Introduction

nix-stable-diffusion

Flake for running SD on NixOS

What's done

  • Nix devShell capable of running InvokeAI's flavor of SD without need to fallback for pip or conda (targets AMD ROCM)
  • ...???
  • PROFIT

How to use it?

  1. Clone repo
  2. Clone submodule with InvokeAI
  3. Run nix develop, wait for shell to build
  4. Inside InvokeAI's directory, run python scripts/preload_models.py to preload models
  5. Place SD weights into models/ldm/stable-diffusion-v1/model.ckpt
  6. Run CLI with python scripts/invoke.py or GUI with python scripts/invoke.py --web
  7. For more detailed instructions consult https://invoke-ai.github.io/InvokeAI/installation/INSTALL_LINUX/

What's needed to be done

  • devShell with CUDA support (should be trivial, but requires volunteer with NVidia GPU)
  • Missing packages definitions should be submitted to Nixpkgs
  • Investigate ROCM device warning on startup
  • Apply patches so that all downloaded models would go into one specific folder
  • Should create a PR to pynixify with "skip-errors mode" so that no ugly patches would be necessary
  • Shell hooks for initial setup?
  • May be this devShell should be itself turned into a package?
  • Add additional flavors of SD ?

Acknowledgements

Many many thanks to https://github.com/cript0nauta/pynixify which generated all the boilerplate for missing python packages.
Also thanks to https://github.com/colemickens/stable-diffusion-flake and https://github.com/skogsbrus/stable-diffusion-nix-flake for inspiration and some useful code snippets.

nix-stable-diffusion's People

Contributors

gbtb 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.