GithubHelp home page GithubHelp logo

virchau13 / automatic1111-webui-nix Goto Github PK

View Code? Open in Web Editor NEW
139.0 139.0 19.0 23 KB

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

License: MIT License

Nix 100.00%
cuda nix nixos rocm stable-diffusion stable-diffusion-webui

automatic1111-webui-nix's Introduction

I like computing.

automatic1111-webui-nix's People

Contributors

cloudef avatar quag avatar rprospero avatar virchau13 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

automatic1111-webui-nix's Issues

Segfault with AMD / ROCm on NixOS stable 23.05 in stable-diffusion-webui, probably due to conflicting Mesa build

After cloning https://github.com/AUTOMATIC1111/stable-diffusion-webui I tried to run it with ROCm using nix develop .#rocm. However the webui crashes as soon as it gets up and running with segmentation fault.

In the shell I get an error DRI driver not from this Mesa build ('23.0.3' vs '23.1.9') which would indicate some incompatible build of Mesa being present. My main system is running the stable branch of NixOS, currently 23.05. So that is where Mesa build 23.0.3 would come from. Any ideas why 23.1.9 is there? Presumably because the flake pulls in the latest nixpkgs?

Any ideas how to get around this? Help is appreciated. ๐Ÿ˜„

Full output here:

################################################################
Launching launch.py...
################################################################
ldconfig: Can't open cache file /nix/store/gqghjch4p1s69sv4mcjksb2kb65rwqjy-glibc-2.38-23/etc/ld.so.cache
: No such file or directory
Cannot locate TCMalloc (improves CPU memory usage)
Python 3.10.13 (main, Aug 24 2023, 12:59:26) [GCC 12.3.0]
Version: v1.6.0
Commit hash: 5ef669de080814067961f28357256e8fe27544f4
Launching Web UI with arguments: 
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
Calculating sha256 for /home/ap/Coding/python/stable-diffusion-webui/models/Stable-diffusion/v1-5-pruned-emaonly.safetensors: Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 6.7s (prepare environment: 2.1s, import torch: 2.1s, import gradio: 0.6s, setup paths: 0.5s, other imports: 0.4s, load scripts: 0.4s, create ui: 0.4s, gradio launch: 0.1s).
Opening in existing browser session.
DRI driver not from this Mesa build ('23.0.3' vs '23.1.9')
failed to bind extensions
DRI driver not from this Mesa build ('23.0.3' vs '23.1.9')
failed to bind extensions
DRI driver not from this Mesa build ('23.0.3' vs '23.1.9')
failed to bind extensions
DRI driver not from this Mesa build ('23.0.3' vs '23.1.9')
failed to bind extensions
6ce0161689b3853acaa03779ec93eafe75a02f4ced659bee03f50797806fa2fa
Loading weights [6ce0161689] from /home/ap/Coding/python/stable-diffusion-webui/models/Stable-diffusion/v1-5-pruned-emaonly.safetensors
Creating model from config: /home/ap/Coding/python/stable-diffusion-webui/configs/v1-inference.yaml
./webui.sh: line 255: 144988 Segmentation fault      (core dumped) "${python_cmd}" -u "${LAUNCH_SCRIPT}" "$@"

libc10_hip.so: cannot open shared object file

/path/to/repos/stable-diffusion-webui/venv/lib/python3.10/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: libc10_hip.so: cannot open shared object file: No such file or directory

I've tried multiple flakes including the ones from the original thread. hmm

this occurs when running the webui.sh

libc.so.6: version `GLIBC_2.38' not found

I get this error since upgrading to 23.11.

When running nix-shell --argstr variant CUDA and then ./webui.sh, I get the following output:

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################

################################################################
Running on username user
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
python3: /nix/store/46m4xx889wlhsdj72j38fnlyyvvvvbyb-glibc-2.37-8/lib/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/d88c3233krm9b2vwip6i1p71933j3dbw-gperftools-2.10/lib/libtcmalloc.so)
python3: /nix/store/46m4xx889wlhsdj72j38fnlyyvvvvbyb-glibc-2.37-8/lib/libm.so.6: version `GLIBC_2.38' not found (required by /nix/store/50kabpj0s79040a42b7jj2dxn85wmbfd-python3-3.10.13/lib/libpython3.10.so.1.0)
python3: /nix/store/46m4xx889wlhsdj72j38fnlyyvvvvbyb-glibc-2.37-8/lib/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/50kabpj0s79040a42b7jj2dxn85wmbfd-python3-3.10.13/lib/libpython3.10.so.1.0)
python3: /nix/store/46m4xx889wlhsdj72j38fnlyyvvvvbyb-glibc-2.37-8/lib/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/myw67gkgayf3s2mniij7zwd79lxy8v0k-gcc-12.3.0-lib/lib/libstdc++.so.6)

Getting Torch is not able to use GPU error

I have pulled the latest https://github.com/AUTOMATIC1111/stable-diffusion-webui, added all nix files from this repo to the SD folder, ran nix-shell and waited for it to finish. Then I ran ./webui.sh and it installed dependencies of SD ui, and then I got this error:

################################################################
Launching launch.py...
################################################################
ldconfig: Can't open cache file /nix/store/3n58xw4373jp0ljirf06d8077j15pc4j-glibc-2.37-8/etc/ld.so.cache
: No such file or directory
Cannot locate TCMalloc (improves CPU memory usage)
Python 3.10.12 (main, Jun  6 2023, 22:43:10) [GCC 12.3.0]
Version: v1.6.0
Commit hash: 5ef669de080814067961f28357256e8fe27544f4
Traceback (most recent call last):
  File "/home/juh9870/games/StableDiffusion/launch.py", line 48, in <module>
    main()
  File "/home/juh9870/games/StableDiffusion/launch.py", line 39, in main
    prepare_environment()
  File "/home/juh9870/games/StableDiffusion/modules/launch_utils.py", line 356, in prepare_environment
    raise RuntimeError(
RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check

I have a 3080 GPU on my machine and I managed to run Auto1111 UI before switching to NixOS

No defaultPackage.x86_64-linux?

Hi,

Blindly following the README instructions yields (in my laptop):

error: getting status of '/nix/store/jr0dgqz1ffl4lyw1fzihaj9q0c0g9bq8-source/flake.nix': No such file or directory

After running nix flake update, I get this error now:

error: flake 'git+file:///[...]/automatic1111-webui-nix' does not provide attribute 'packages.x86_64-linux.default' or 'defaultPackage.x86_64-linux'

I'm running NixOS 22.11 (configured using flakes), Linux kernel 5.15.103.

Any ideas?

error: attempt to call something which is not a function but a set

 ฮ˜ nix-shell
error: attempt to call something which is not a function but a set

       at /home/adan/projects/stable-diffusion/stable-diffusion-webui/shell.nix:1:36:

            1| let pkgs = import <nixpkgs> {}; in import ./impl.nix pkgs pkgs.lib
             |                                    ^
            2|

followed the guide and getting the following back.

nix-shell (Nix) 2.13.2

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.