Open hallucination-gallery opened 1 year ago
Same issue here, also AMD RX 6800 XT on Arch Linux, I'm able to use Easy Diffusion out of the box just fine, but I've slammed my head against a wall for days trying to get a1111 to work to no avail.
I was able to get A1111 (and several other UI's) working by downgrading my torch packages. pip install torch==1.13.1+rocm5.2 torchvision==0.14.1+rocm5.2 --extra-index-url https://download.pytorch.org/whl/rocm5.2
I receive an error on startup saying that my torch version is unsupported, but the interface works and I'm able to generate images.
For anything AMD, try running the directml fork (go to forks, and click on the first one).
Tested that out today. Generated the same NaNs exceptions while running the directml fork as I did on main while running torch 2.0.0. Exceptions cleared up when I downgraded my torch packages.
Oh, have you tried the --disable-nan-check
option?
Oh, have you tried the
--disable-nan-check
option?
For me, this doesn't stop the problem, just suppresses the error, I just get black images or random noise.
For me, this doesn't stop the problem, just suppresses the error, I just get black images or random noise.
You'll need --precision full --no-half
as well, at least what I remember off the top of my head.
Yes, I tried those flags too, made no difference.
I was able to get A1111 (and several other UI's) working by downgrading my torch packages. pip install torch==1.13.1+rocm5.2 torchvision==0.14.1+rocm5.2 --extra-index-url https://download.pytorch.org/whl/rocm5.2
Strange, I get this error, not sure why
ERROR: Could not find a version that satisfies the requirement torch==1.13.1+rocm5.2 (from versions: 1.13.0, 1.13.1, 2.0.0, 2.0.1) ERROR: No matching distribution found for torch==1.13.1+rocm5.2
Here is my setup:
--backend directml --disable-nan-check --no-download-sd-model --enable-insecure-extension-access --no-gradio-queue --medvram --always-batch-cond-uncond --no-half --precision full --upcast-sampling --use-cpu CLIP BLIP interrogate gfpgan bsrgan esrgan scunet codeformer --opt-split-attention --sub-quad-q-chunk-size 512 --sub-quad-kv-chunk-size 512 --sub-quad-chunk-threshold 80 --update-all-extensions --update-check --listen
I also fresh installed the directml fork (lshqqytiger's stable-diffusion-webui-directml) as I broke stuff earlier this week.
ERROR: Could not find a version that satisfies the requirement torch==1.13.1+rocm5.2 (from versions: 1.13.0, 1.13.1, 2.0.0, 2.0.1) ERROR: No matching distribution found for torch==1.13.1+rocm5.2
That is really strange - the command is taken straight from the PyTorch website guide for installing previous versions - I only excluded the torchaudio package.
--backend directml --disable-nan-check --no-download-sd-model --enable-insecure-extension-access --no-gradio-queue --medvram --always-batch-cond-uncond --no-half --precision full --upcast-sampling --use-cpu CLIP BLIP interrogate gfpgan bsrgan esrgan scunet codeformer --opt-split-attention --sub-quad-q-chunk-size 512 --sub-quad-kv-chunk-size 512 --sub-quad-chunk-threshold 80 --update-all-extensions --update-check --listen
I'll try adding some of these in one by one later. I bet it's one of the "--use-cpu" flags that's letting your setup work, my guess is CLIP, because I'm able to generate noise in other UI's on 2.0.0.
Here is my setup:
--backend directml --disable-nan-check --no-download-sd-model --enable-insecure-extension-access --no-gradio-queue --medvram --always-batch-cond-uncond --no-half --precision full --upcast-sampling --use-cpu CLIP BLIP interrogate gfpgan bsrgan esrgan scunet codeformer --opt-split-attention --sub-quad-q-chunk-size 512 --sub-quad-kv-chunk-size 512 --sub-quad-chunk-threshold 80 --update-all-extensions --update-check --listen
I also fresh installed the directml fork (lshqqytiger's stable-diffusion-webui-directml) as I broke stuff earlier this week.
Doesn't use cpu flag just bypass using the gpu entirely? Surely that's super slow?
...I bet it's one of the "--use-cpu" flags that's letting your setup work, my guess is CLIP, because I'm able to generate noise in other UI's on 2.0.0.
Quite possible. I don't wanna touch my setup anymore since it's working, but I'll probably test more again when there's breaking changes
Doesn't use cpu flag just bypass using the gpu entirely? Surely that's super slow?
Kinda, but it's like the only way for certain parts of stable diffusion to work properly. It's more of a failsafe, I think.
Also it's only CLIP BLIP interrogate gfpgan bsrgan esrgan scunet codeformer
that are running on CPU.
I highly recommend reading this discussion for more details on setting up on AMD GPUs.
Your setup didn't work for me, in full or in part. I'm not sure what the difference in our configs is but I'm going to keep with the main fork and drop down to Torch 1.13.1
I don't need to use any args running on Torch 1.13.1. None of the must-haves in the discussion linked, it just works, No black squares and 512x512 images generate at 7-9 it/s.
same issue on ubuntu 22.04+kernel 5.19 with pytorch2.01+ rocm5.4.2.
same issue on 6.3.8-arch1-1 with torch2.0.1+rocm5.4.2
(stable-diffusion-ui worked with HSA_OVERRIDE_GFX_VERSION='10.3.0'
)
ERROR: Could not find a version that satisfies the requirement torch==1.13.1+rocm5.2 (from versions: 1.13.0, 1.13.1, 2.0.0, 2.0.1) ERROR: No matching distribution found for torch==1.13.1+rocm5.2
That is really strange - the command is taken straight from the PyTorch website guide for installing previous versions - I only excluded the torchaudio package.
--backend directml --disable-nan-check --no-download-sd-model --enable-insecure-extension-access --no-gradio-queue --medvram --always-batch-cond-uncond --no-half --precision full --upcast-sampling --use-cpu CLIP BLIP interrogate gfpgan bsrgan esrgan scunet codeformer --opt-split-attention --sub-quad-q-chunk-size 512 --sub-quad-kv-chunk-size 512 --sub-quad-chunk-threshold 80 --update-all-extensions --update-check --listen
I'll try adding some of these in one by one later. I bet it's one of the "--use-cpu" flags that's letting your setup work, my guess is CLIP, because I'm able to generate noise in other UI's on 2.0.0.
The builds on PyTorch for 1.x don't include Python 3.11. You'll need to make sure you are running a Python 3.10 at most. Files are here https://download.pytorch.org/whl/torch/. But you'll also need to downgrade ROCm etc... Or instead build from source for Python 3.11...
same black images or NaN error encountered here with my RX 680M iGPU (4 GB vram) on Arch Linux, kernel 6.6.7-zen, python-pytorch-opt-rocm-2.1.2-1
, rocm-hip-sdk-5.7.1-2
.
this is the command i'm currently using to reproduce this:
PYTORCH_HIP_ALLOC_CONF=garbage_collection_threshold:0.6,max_split_size_mb:128 HSA_OVERRIDE_GFX_VERSION=10.3.0 ./webui.sh --always-batch-cond-uncond --opt-sub-quad-attention --lowvram --disable-nan-check
notice how i'm not disabling half precision which has visible progress before it anticlimactically runs out of memory, or forcing CPU which works but is 3 times slower than that. this is beyond frustrating.
P.S. taking my user out of the video
group reduced equally strange Memory access fault by GPU node-1
errors.
I just wanted to add that I recently experienced many of these issues, NaN errors, image artifacts, etc after upgrading to a newer rocm/torch. I believe it was rocm6 and torch 2.1.. I use docker in Linux, and went back to a 5.4.2 image and now I'm very stable. I was able to upgrade Python to 3.10, and pytorch to 2.0.2 with no issues. Latest webui works fine. I haven't tried the 2.1. torch yet. 6800XT
Is there an existing issue for this?
What happened?
Followed each of the potential installation instructions to install on AMD Automatic on Ubuntu 22.04, Arch with AMD, and Docker on Arch No images able to be generated. Only NaN or black squares Same issue on all fronts, so using the Docker installation process as an example I am installing the program remotely via SSH on a gaming PC / Server, and accessing the UI via local network
Steps to reproduce the problem
What should have happened?
An image of any sort is generated from any prompt
Commit where the problem happens
https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/5ab7f213bec2f816f9c5644becb32eb72c8ffb89
What platforms do you use to access the UI ?
Windows
What browsers do you use to access the UI ?
Mozilla Firefox
Command Line Arguments
List of extensions
No
Console logs
Additional information
I am able to use the unofficial windows AMD installation process on the same machine without issue (aside from it being slow)