Code Monkey home page Code Monkey logo

Comments (26)

arkni8 avatar arkni8 commented on June 15, 2024 1

@hsm207 Oh okay, let me spin up Ubuntu again because it was frustrating me all the way and nothing was working xD.

I will report back in a bit.

from stable-diffusion-webui.

aadityapattabhiraman avatar aadityapattabhiraman commented on June 15, 2024

try activating a venv and then try running it

from stable-diffusion-webui.

arkni8 avatar arkni8 commented on June 15, 2024

I have already done the usual. Activated venv by running the command.
python3.10 -m venv venv as written in the guide.

Deleted venv directory and activated it again. Didn't help.

(Side note not directly relating to this build - I have tried the lshqqytiger build as well, it failed to install onnx directml library. So I am blocked either ways. )

from stable-diffusion-webui.

aadityapattabhiraman avatar aadityapattabhiraman commented on June 15, 2024

python3.10 -m venv venv, does not activate a virtualenvironment, it only creates it. so i assume that you used the right command to activate it.

from stable-diffusion-webui.

arkni8 avatar arkni8 commented on June 15, 2024

umm, the guide didnt mention anything about it "activating".

source venv/bin/activate is this the command to activate venv? I dont work with python, so I am not sure how virtual envs are managed in python

from stable-diffusion-webui.

arkni8 avatar arkni8 commented on June 15, 2024

Well there you go, used that command, still got the same problem

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye), Fedora 34+ and openSUSE Leap 15.4 or newer.
################################################################

################################################################
Running on ark user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
python venv already activate or run without venv: /home/ark/stable-diffusion-webui/venv
################################################################

################################################################
Launching launch.py...
################################################################
glibc version is 2.35
Cannot locate TCMalloc. Do you have tcmalloc or google-perftool installed on your system? (improves CPU memory usage)
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
Version: v1.9.3
Commit hash: 1c0a0c4c26f78c32095ebc7f8af82f5c04fca8c0
Installing torch and torchvision
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu121
Collecting torch==2.1.2
Killed
Traceback (most recent call last):
  File "/home/ark/stable-diffusion-webui/launch.py", line 48, in <module>
    main()
  File "/home/ark/stable-diffusion-webui/launch.py", line 39, in main
    prepare_environment()
  File "/home/ark/stable-diffusion-webui/modules/launch_utils.py", line 380, in prepare_environment
    run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch", live=True)
  File "/home/ark/stable-diffusion-webui/modules/launch_utils.py", line 115, in run
    raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install torch.
Command: "/home/ark/stable-diffusion-webui/venv/bin/python3" -m pip install torch==2.1.2 torchvision==0.16.2 --extra-index-url https://download.pytorch.org/whl/cu121
Error code: 137

from stable-diffusion-webui.

LibertyGM avatar LibertyGM commented on June 15, 2024

The same error doesn't work for me either. It can't find version 2.1.2, and it doesn't work on the other one.

from stable-diffusion-webui.

hsm207 avatar hsm207 commented on June 15, 2024

what happens if you activate the venv environment and then run pip install torch torchvision?

from stable-diffusion-webui.

LibertyGM avatar LibertyGM commented on June 15, 2024

what happens if you activate the venv environment and then run pip install torch torchvision?

what is there to restart? It doesn't even download. The SD web UI cannot be installed

from stable-diffusion-webui.

hsm207 avatar hsm207 commented on June 15, 2024

Try installing torch yourself first, then run the webui script. Use either of these commands to install torch:

pip install torch==2.1.2 torchvision==0.16.2  --index-url https://download.pytorch.org/whl/cpu
pip install torch==2.1.2 torchvision==0.16.2  --index-url https://download.pytorch.org/whl/rocm5.6

from stable-diffusion-webui.

LibertyGM avatar LibertyGM commented on June 15, 2024

Try installing torch yourself first, then run the webui script. Use either of these commands to install torch:

pip install torch==2.1.2 torchvision==0.16.2  --index-url https://download.pytorch.org/whl/cpu
pip install torch==2.1.2 torchvision==0.16.2  --index-url https://download.pytorch.org/whl/rocm5.6

I use Arch Linux. In which folder should I install "torch" with this command?

from stable-diffusion-webui.

hsm207 avatar hsm207 commented on June 15, 2024

@LibertyGM

There's no folder to pick. Just activate the venv that the webui script created and then run the command.

Also, my comments were actually targeted @arkni8 who is running on WSL and AMD GPU so not sure how much this applies to your case.

from stable-diffusion-webui.

hsm207 avatar hsm207 commented on June 15, 2024

and after you activated the venv and before you run the pip install command, run which python and make sure the out is the path to the python interpreter in your venv

from stable-diffusion-webui.

arkni8 avatar arkni8 commented on June 15, 2024
pip install torch==2.1.2 torchvision==0.16.2  --index-url https://download.pytorch.org/whl/cpu
pip install torch==2.1.2 torchvision==0.16.2  --index-url https://download.pytorch.org/whl/rocm5.6

So I was able to run these command, within the venv.
But this time, on running ./webui.sh --no-half --precision full --lowvram --upcast-sampling, I am getting the following error:

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye), Fedora 34+ and openSUSE Leap 15.4 or newer.
################################################################

################################################################
Running on ark user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
python venv already activate or run without venv: /home/ark/stable-diffusion-webui/venv
################################################################

################################################################
Launching launch.py...
################################################################
glibc version is 2.39
Cannot locate TCMalloc. Do you have tcmalloc or google-perftool installed on your system? (improves CPU memory usage)
Python 3.10.14 (main, Apr 27 2024, 21:17:55) [GCC 13.2.0]
Version: v1.9.3
Commit hash: 1c0a0c4c26f78c32095ebc7f8af82f5c04fca8c0
Traceback (most recent call last):
  File "/home/ark/stable-diffusion-webui/launch.py", line 48, in <module>
    main()
  File "/home/ark/stable-diffusion-webui/launch.py", line 39, in main
    prepare_environment()
  File "/home/ark/stable-diffusion-webui/modules/launch_utils.py", line 386, 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

So, now Torch is unable to use GPU.

Using --skip-torch-cuda-test skipped the check, but while downloading safetensors, it shows this error
'Torch not compiled with CUDA enabled', memory monitor disabled.

So, did it ignore rocm and just gonna use the CPU?

from stable-diffusion-webui.

arkni8 avatar arkni8 commented on June 15, 2024

Bonus question - what do I do, to scrap my current attempt and redo the whole build without having to download all the bigger resources?

Or do I just run ./webui.sh with different arguments and it will change the settings?

from stable-diffusion-webui.

hsm207 avatar hsm207 commented on June 15, 2024

are you sure your gpu supports rocm? after you install the torch, you should try running some sample torch programs directly. You can see here for examples:

https://pytorch.org/docs/stable/notes/hip.html

Bonus question - what do I do, to scrap my current attempt and redo the whole build without having to download all the bigger resources?

i don't know

from stable-diffusion-webui.

arkni8 avatar arkni8 commented on June 15, 2024
pip install torch==2.1.2 torchvision==0.16.2  --index-url https://download.pytorch.org/whl/cpu
pip install torch==2.1.2 torchvision==0.16.2  --index-url https://download.pytorch.org/whl/rocm5.6

Was I supposed to run one of the two commands btw? Because on running the second command, nothing happened. Just a bunch of "Requirement already satisfied" and didn't download anything new.

But okay, I will see if I can run some sample torch programs.

from stable-diffusion-webui.

hsm207 avatar hsm207 commented on June 15, 2024

yes, only choose one. either you want to install pytorch + cpu or pytorch + rocm support.

from stable-diffusion-webui.

arkni8 avatar arkni8 commented on June 15, 2024

Okay, I uninstalled the torch+cpu and reinstalled torch+rocm. Did not work in that case either.

After a lot of fiddling, it seems like rocm is just not the way to go if using someone is trying ROCm. ROCm apparently still doesn't support WSL. Well, its unclear at the moment and googling gives a lot of unclear result and lot of people just chattering. I will keep looking but I wil close the issue soon if nothing comes up. :)

SIDE EDIT - Running SD on CPU is fun. A whopping 8-9 min waiting for a 512x512 image with 20 iterations. xD

from stable-diffusion-webui.

hsm207 avatar hsm207 commented on June 15, 2024

ROCm apparently still doesn't support WSL

but they already support running on windows directly:

https://rocm.docs.amd.com/projects/install-on-windows/en/latest/how-to/install.html

from stable-diffusion-webui.

arkni8 avatar arkni8 commented on June 15, 2024

but they already support running on windows directly:

https://rocm.docs.amd.com/projects/install-on-windows/en/latest/how-to/install.html

Yea, I know. I figured I will try WSL first....I don't know why. Probably because managing python would be easier on Linux than on Windows. Anyway, I have it running now, with lshqqytiger's DirectML build (plus his build has got some gotcha apparently, though I have not found one?). I will make a post on the Discussion pages of both the builds since my GPU is literally the lowest tier 4gigs Polaris GPU on the market. Maybe that will give them hope :) lol

from stable-diffusion-webui.

arkni8 avatar arkni8 commented on June 15, 2024

Either ways, at the moment, I was unsuccessful in making SD webUI work on WSL2 with ROCm for anyone reading for a conclusion. I could not give it more time though to try other ways like directml in wsl2, because thats supported. potential for anyone wondering.

from stable-diffusion-webui.

LibertyGM avatar LibertyGM commented on June 15, 2024
pip install torch==2.1.2 torchvision==0.16.2  --index-url https://download.pytorch.org/whl/cpu
pip install torch==2.1.2 torchvision==0.16.2  --index-url https://download.pytorch.org/whl/rocm5.6

Was I supposed to run one of the two commands btw? Because on running the second command, nothing happened. Just a bunch of "Requirement already satisfied" and didn't download anything new.

But okay, I will see if I can run some sample torch programs.

Does not work. SD is not even installed.

Looking in indexes: https://download.pytorch.org/whl/rocm5.6
ERROR: Could not find a version that satisfies the requirement torch==2.1.2 (from versions: 2.2.0+rocm5.6, 2.2.1+rocm5.6, 2.2.2+rocm5.6)
ERROR: No matching distribution found for torch==2.1.2

from stable-diffusion-webui.

hsm207 avatar hsm207 commented on June 15, 2024
pip install torch==2.1.2 torchvision==0.16.2  --index-url https://download.pytorch.org/whl/cpu
pip install torch==2.1.2 torchvision==0.16.2  --index-url https://download.pytorch.org/whl/rocm5.6

Was I supposed to run one of the two commands btw? Because on running the second command, nothing happened. Just a bunch of "Requirement already satisfied" and didn't download anything new.
But okay, I will see if I can run some sample torch programs.

Does not work. SD is not even installed.

Looking in indexes: https://download.pytorch.org/whl/rocm5.6 ERROR: Could not find a version that satisfies the requirement torch==2.1.2 (from versions: 2.2.0+rocm5.6, 2.2.1+rocm5.6, 2.2.2+rocm5.6) ERROR: No matching distribution found for torch==2.1.2

Then it could be that pytorch is not supported on your platform. I'd check their start locally page to make you sure your system meet their requirements.

from stable-diffusion-webui.

LibertyGM avatar LibertyGM commented on June 15, 2024

Then it could be that pytorch is not supported on your platform. I'd check their start locally page to make you sure your system meet their requirements.

My system is working fine and has been working. It says there that I can't download version 2.1.2 because it simply doesn't exist.

I have Arch Linux and I have been using SD for a long time and everything worked.

from stable-diffusion-webui.

arkni8 avatar arkni8 commented on June 15, 2024

@LibertyGM Mate, maybe start another issue? Why are you talking on a closed issue page?

from stable-diffusion-webui.

Related Issues (20)

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.