Open tokenwizard opened 1 year ago
Could you try selecting a different model and running? Looks like it never actually starts generating, and is only loading the model
me too, never starts whatever i change a different model and different data. Please help.
Please check the browser's JS console for errors or warnings. If there are any, please copy them here:
Object
-> Copy Object
I am experiencing the same issue with a similar setup. The browser console (both Firefox and Chromium) do no throw any error. The output looks like the following:
Firefox:
Chromium:
@puresick what operating system, gpu and python version do you have?
Browser Console does not show any errors. The Console just stops here with these messages. The InvokeAI interface still looks like it is "Generating" but never even gives a preview of the first step. I upgraded from 3.0.2post1 to 3.1.0 and the problem persists.
I confirmed in the Bash console that it is detecting my GPU and there are no obvious errors there either.
Here is the JS Console output:
System Info is below:
Maybe it's nothing, but I'm suspicious of how both you @puresick and @tokenwizard are on AMD. We may be doing something wrong somehow.
Can you please try forcing generation to CPU? If you run the configure script, it should have an option to force CPU. Then try generating. It'll be slow as hell but if it works, we have a clue.
Also can you please activate the venv (easy way is run the script to start the app and choose developer console) and run python --version
I will say I ran this on my AMD CPU desktop in CPU mode and it worked. Trying to run it now in a Proxmox LXC with the AMD GPU pass through.
I'll try these suggestions tomorrow.
Sent from Proton Mail mobile
-------- Original Message -------- On Sep 5, 2023, 7:31 PM, psychedelicious wrote:
Maybe it's nothing, but I'm suspicious of how both you @.(https://github.com/puresick) and @.(https://github.com/tokenwizard) are on AMD. We may be doing something wrong somehow.
Can you please try forcing CPU? If you run the configure script, it should have an option to force CPU. Then try generating. It'll be slow as hell but if it works, we have a clue.
Also can you please activate the venv (easy way is run the script to start the app and choose developer console) and run python --version
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
Ah, yeah I meant both of you having an AMD GPU caught my eye. If CPU works for you, and GPU doesn't, we may have some issues related to AMD GPUs.
@psychedelicious Here are my system specs:
OS: Arch Linux Kernel: 6.4.12-arch1-1 CPU: AMD Ryzen 7 3700X GPU: AMD ATI Radeon RX 5500 XT 8GB VRAM Python: 3.11.5
Generating images on my CPU runs fine.
Hi!
Let’s see if it is an InvokeAI problem or an issue with the upstream diffusers library on AMD.
Using a text editor, please enter the following script:
from diffusers import DiffusionPipeline
pipeline = DiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", use_safetensors=True)
pipeline.to("cuda")
image = pipeline("An image of a squirrel in Picasso style").images[0]
image.save("image_of_squirrel_painting.png")
(This is the “getting started” script for Diffusers from Hugging Face: https://huggingface.co/docs/diffusers/quicktour)
Save the script as test_diffusers.py
Activate the InvokeAI virtual environment, either by starting the launcher script and selecting the “developer’s console” option, or by giving the command source ~/invokeai/.venv/bin/activate
(where ~/invokeai
is the location of your InvokeAI directory).
Run the script with python test_diffusers.py
The script may re-download stable-diffusion-v1.5
(sorry, but it’s more foolproof) and then start generating. Generation should be fast - no more than 10s.
If all goes well, it will leave you with a PNG named image_of_a_squirrel_painting.png
.
If this works, then the bug is in InvokeAI. If not, then there is a problem with some library, such as pytorch
, ROCM, or diffusers
itself.
This is what I get when I try to run that script from the Developer Console:
@tokenwizard That's... weird...
Let's grab some additional diagnostic data:
pip list
, copy and paste the output here for usNext, while still in the dev console, we will try running the test code differently:
python
to enter the python REPLpython
onwards and paste herequit()
at the >>>
promptHere is the output of pip list:
(InvokeAI) root@AI-Server ~/invokeai> pip list
Package Version
----------------------- ----------------
absl-py 1.4.0
accelerate 0.21.0
addict 2.4.0
aiohttp 3.8.5
aiosignal 1.3.1
albumentations 1.3.1
antlr4-python3-runtime 4.9.3
anyio 3.7.1
async-timeout 4.0.3
attrs 23.1.0
basicsr 1.4.2
bidict 0.22.1
boltons 23.0.0
cachetools 5.3.1
certifi 2023.7.22
cffi 1.15.1
charset-normalizer 3.2.0
click 8.1.7
clip-anytorch 2.5.2
cmake 3.27.2
coloredlogs 15.0.1
compel 2.0.2
contourpy 1.1.0
controlnet-aux 0.0.6
cycler 0.11.0
datasets 2.14.4
diffusers 0.20.2
dill 0.3.7
dnspython 2.4.2
dynamicprompts 0.29.0
easing-functions 1.0.4
einops 0.6.1
eventlet 0.33.3
exceptiongroup 1.1.3
facexlib 0.3.0
fastapi 0.88.0
fastapi-events 0.8.0
fastapi-socketio 0.0.10
filelock 3.12.2
filterpy 1.4.5
Flask 2.1.3
Flask-Cors 3.0.10
Flask-SocketIO 5.3.0
flaskwebgui 1.0.3
flatbuffers 23.5.26
fonttools 4.42.1
frozenlist 1.4.0
fsspec 2023.6.0
ftfy 6.1.1
future 0.18.3
gfpgan 1.3.8
google-auth 2.22.0
google-auth-oauthlib 1.0.0
greenlet 2.0.2
grpcio 1.57.0
h11 0.14.0
httptools 0.6.0
huggingface-hub 0.16.4
humanfriendly 10.0
idna 3.4
imageio 2.31.1
importlib-metadata 6.8.0
invisible-watermark 0.2.0
InvokeAI 3.1.0
itsdangerous 2.1.2
Jinja2 3.1.2
joblib 1.3.2
kiwisolver 1.4.5
lazy_loader 0.3
lightning-utilities 0.9.0
lit 16.0.6
llvmlite 0.40.1
lmdb 1.4.1
Markdown 3.4.4
markdown-it-py 3.0.0
MarkupSafe 2.1.3
matplotlib 3.7.2
mdurl 0.1.2
mediapipe 0.10.3
mpmath 1.3.0
multidict 6.0.4
multiprocess 0.70.15
networkx 3.1
npyscreen 4.10.5
numba 0.57.1
numpy 1.24.4
oauthlib 3.2.2
omegaconf 2.3.0
onnx 1.14.0
onnxruntime 1.15.1
opencv-contrib-python 4.8.0.76
opencv-python 4.8.0.76
opencv-python-headless 4.8.0.76
packaging 23.1
pandas 2.0.3
picklescan 0.0.11
Pillow 10.0.0
pip 22.0.2
platformdirs 3.10.0
prompt-toolkit 3.0.39
protobuf 3.20.3
psutil 5.9.4
pyarrow 13.0.0
pyasn1 0.5.0
pyasn1-modules 0.3.0
pycparser 2.21
pydantic 1.10.12
Pygments 2.16.1
Pympler 1.0.1
pyparsing 3.0.9
PyPatchMatch 1.0.1
pyperclip 1.8.2
pyreadline3 3.4.1
python-dateutil 2.8.2
python-dotenv 1.0.0
python-engineio 4.6.1
python-multipart 0.0.6
python-socketio 5.8.0
pytorch-lightning 2.0.7
pytorch-triton-rocm 2.0.2
pytz 2023.3
PyWavelets 1.4.1
PyYAML 6.0.1
qudida 0.0.4
realesrgan 0.3.0
regex 2023.8.8
requests 2.28.2
requests-oauthlib 1.3.1
rich 13.5.2
rsa 4.9
safetensors 0.3.1
scikit-image 0.21.0
scikit-learn 1.3.0
scipy 1.11.2
Send2Trash 1.8.2
setuptools 59.6.0
six 1.16.0
sniffio 1.3.0
sounddevice 0.4.6
starlette 0.22.0
sympy 1.12
tb-nightly 2.15.0a20230825
tensorboard 2.14.0
tensorboard-data-server 0.7.1
test-tube 0.7.5
threadpoolctl 3.2.0
tifffile 2023.8.12
timm 0.6.13
tokenizers 0.13.3
tomli 2.0.1
torch 2.0.1+rocm5.4.2
torchmetrics 0.11.4
torchsde 0.2.5
torchvision 0.15.2+rocm5.4.2
tqdm 4.66.1
trampoline 0.1.2
transformers 4.31.0
typing_extensions 4.7.1
tzdata 2023.3
urllib3 1.26.16
uvicorn 0.21.1
uvloop 0.17.0
watchfiles 0.20.0
wcwidth 0.2.6
websockets 11.0.3
Werkzeug 2.3.7
wheel 0.37.1
xxhash 3.3.0
yapf 0.40.1
yarl 1.9.2
zipp 3.16.2
I just realized when I copied the script content I somehow missing the first line that imports the diffusers module. I updated the script and it seems to be running now. I assume it is downloading SD 1.5 which will take some time on my current connection.
So it has been "stuck" here for the past half hour. Should I see some sort of output when it completes?
I manually exited with CTRL-Z and I do not see the expected output file.
Well, I let it sit there for over two hours and it never seems to complete. I do see that the CPU usage on the server spikes for the entire time I leave it running, but it never generates the image.
I should also add that before I transferred the AMD GPU into my server, I had it in my desktop and Automatic1111 was running on the GPU just fine.
So it has been "stuck" here for the past half hour. Should I see some sort of output when it completes?
I manually exited with CTRL-Z and I do not see the expected output file.
It shouldn't get stuck like that.
I think this is pointing to a problem with either torch
or with ROCm driver that is installed on your machine. Could you try running the following command from your terminal and pasting a screenshot of the result?
rocm-smi
There's some additional ROCm debugging tips here: https://invoke-ai.github.io/InvokeAI/installation/030_INSTALL_CUDA_AND_ROCM
Hmmm, In Ubuntu 22.04 it seems I don't have rocm-smi
. I do have the rocm-utils
package installed. I have the rocminfo
tool and the output is below. I will check the link you provided for additional troubleshooting.
The Agent 3 section shows the GPU details.
root@AI-Server:~/invokeai# rocminfo
ROCk module is loaded
=====================
HSA System Attributes
=====================
Runtime Version: 1.1
System Timestamp Freq.: 1000.000000MHz
Sig. Max Wait Duration: 18446744073709551615 (0xFFFFFFFFFFFFFFFF) (timestamp count)
Machine Model: LARGE
System Endianness: LITTLE
==========
HSA Agents
==========
*******
Agent 1
*******
Name:
Uuid: CPU-XX
Marketing Name:
Vendor Name: CPU
Feature: None specified
Profile: FULL_PROFILE
Float Round Mode: NEAR
Max Queue Number: 0(0x0)
Queue Min Size: 0(0x0)
Queue Max Size: 0(0x0)
Queue Type: MULTI
Node: 0
Device Type: CPU
Cache Info:
L1: 32768(0x8000) KB
Chip ID: 0(0x0)
ASIC Revision: 0(0x0)
Cacheline Size: 64(0x40)
Max Clock Freq. (MHz): 3300
BDFID: 0
Internal Node ID: 0
Compute Unit: 16
SIMDs per CU: 0
Shader Engines: 0
Shader Arrs. per Eng.: 0
WatchPts on Addr. Ranges:1
Features: None
Pool Info:
Pool 1
Segment: GLOBAL; FLAGS: FINE GRAINED
Size: 32911484(0x1f6307c) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Alignment: 4KB
Accessible by all: TRUE
Pool 2
Segment: GLOBAL; FLAGS: KERNARG, FINE GRAINED
Size: 32911484(0x1f6307c) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Alignment: 4KB
Accessible by all: TRUE
Pool 3
Segment: GLOBAL; FLAGS: COARSE GRAINED
Size: 32911484(0x1f6307c) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Alignment: 4KB
Accessible by all: TRUE
ISA Info:
*******
Agent 2
*******
Name:
Uuid: CPU-XX
Marketing Name:
Vendor Name: CPU
Feature: None specified
Profile: FULL_PROFILE
Float Round Mode: NEAR
Max Queue Number: 0(0x0)
Queue Min Size: 0(0x0)
Queue Max Size: 0(0x0)
Queue Type: MULTI
Node: 1
Device Type: CPU
Cache Info:
L1: 32768(0x8000) KB
Chip ID: 0(0x0)
ASIC Revision: 0(0x0)
Cacheline Size: 64(0x40)
Max Clock Freq. (MHz): 3300
BDFID: 0
Internal Node ID: 1
Compute Unit: 16
SIMDs per CU: 0
Shader Engines: 0
Shader Arrs. per Eng.: 0
WatchPts on Addr. Ranges:1
Features: None
Pool Info:
Pool 1
Segment: GLOBAL; FLAGS: FINE GRAINED
Size: 49500392(0x2f350e8) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Alignment: 4KB
Accessible by all: TRUE
Pool 2
Segment: GLOBAL; FLAGS: KERNARG, FINE GRAINED
Size: 49500392(0x2f350e8) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Alignment: 4KB
Accessible by all: TRUE
Pool 3
Segment: GLOBAL; FLAGS: COARSE GRAINED
Size: 49500392(0x2f350e8) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Alignment: 4KB
Accessible by all: TRUE
ISA Info:
*******
Agent 3
*******
Name: gfx1010
Uuid: GPU-XX
Marketing Name: AMD Radeon RX 5700 XT
Vendor Name: AMD
Feature: KERNEL_DISPATCH
Profile: BASE_PROFILE
Float Round Mode: NEAR
Max Queue Number: 128(0x80)
Queue Min Size: 64(0x40)
Queue Max Size: 131072(0x20000)
Queue Type: MULTI
Node: 2
Device Type: GPU
Cache Info:
L1: 16(0x10) KB
L2: 4096(0x1000) KB
Chip ID: 29471(0x731f)
ASIC Revision: 2(0x2)
Cacheline Size: 64(0x40)
Max Clock Freq. (MHz): 2100
BDFID: 17408
Internal Node ID: 2
Compute Unit: 40
SIMDs per CU: 2
Shader Engines: 2
Shader Arrs. per Eng.: 2
WatchPts on Addr. Ranges:4
Features: KERNEL_DISPATCH
Fast F16 Operation: TRUE
Wavefront Size: 32(0x20)
Workgroup Max Size: 1024(0x400)
Workgroup Max Size per Dimension:
x 1024(0x400)
y 1024(0x400)
z 1024(0x400)
Max Waves Per CU: 40(0x28)
Max Work-item Per CU: 1280(0x500)
Grid Max Size: 4294967295(0xffffffff)
Grid Max Size per Dimension:
x 4294967295(0xffffffff)
y 4294967295(0xffffffff)
z 4294967295(0xffffffff)
Max fbarriers/Workgrp: 32
Pool Info:
Pool 1
Segment: GLOBAL; FLAGS: COARSE GRAINED
Size: 8372224(0x7fc000) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Alignment: 4KB
Accessible by all: FALSE
Pool 2
Segment: GROUP
Size: 64(0x40) KB
Allocatable: FALSE
Alloc Granule: 0KB
Alloc Alignment: 0KB
Accessible by all: FALSE
ISA Info:
ISA 1
Name: amdgcn-amd-amdhsa--gfx1010:xnack-
Machine Models: HSA_MACHINE_MODEL_LARGE
Profiles: HSA_PROFILE_BASE
Default Rounding Mode: NEAR
Default Rounding Mode: NEAR
Fast f16: TRUE
Workgroup Max Size: 1024(0x400)
Workgroup Max Size per Dimension:
x 1024(0x400)
y 1024(0x400)
z 1024(0x400)
Grid Max Size: 4294967295(0xffffffff)
Grid Max Size per Dimension:
x 4294967295(0xffffffff)
y 4294967295(0xffffffff)
z 4294967295(0xffffffff)
FBarrier Max Size: 32
*** Done ***
Hi!
Let’s see if it is an InvokeAI problem or an issue with the upstream diffusers library on AMD.
1. Using a text editor, please enter the following script:
from diffusers import DiffusionPipeline pipeline = DiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", use_safetensors=True) pipeline.to("cuda") image = pipeline("An image of a squirrel in Picasso style").images[0] image.save("image_of_squirrel_painting.png")
(This is the “getting started” script for Diffusers from Hugging Face: https://huggingface.co/docs/diffusers/quicktour)
2. Save the script as `test_diffusers.py` 3. Activate the InvokeAI virtual environment, either by starting the launcher script and selecting the “developer’s console” option, or by giving the command `source ~/invokeai/.venv/bin/activate` (where `~/invokeai` is the location of your InvokeAI directory). 4. Run the script with `python test_diffusers.py` 5. The script may re-download `stable-diffusion-v1.5` (sorry, but it’s more foolproof) and then start generating. Generation should be fast - no more than 10s. 6. If all goes well, it will leave you with a PNG named `image_of_a_squirrel_painting.png`.
If this works, then the bug is in InvokeAI. If not, then there is a problem with some library, such as
pytorch
, ROCM, ordiffusers
itself.
@lstein I tried your python test script above running it inside of the Invoke AI developer console. It becomes stuck with the following screen:
`text_config_dict` is provided which will be used to initialize `CLIPTextConfig`. The value `text_config["id2label"]` will be overriden.
`text_config_dict` is provided which will be used to initialize `CLIPTextConfig`. The value `text_config["bos_token_id"]` will be overriden.
`text_config_dict` is provided which will be used to initialize `CLIPTextConfig`. The value `text_config["eos_token_id"]` will be overriden.
Loading pipeline components...: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:00<00:00, 11.07it/s]
/pytorch/aten/src/ATen/native/hip/Indexing.hip:1148: iiiiiiiieeeeeeeeIndex: Device-side assertion `ssssssss llllllllize' failed.
/pytorch/aten/src/ATen/native/hip/Indexing.hip:1148: iiiiiiiieeeeeeeeIndex: Device-side assertion `ssssssss llllllllize' failed.
/pytorch/aten/src/ATen/native/hip/Indexing.hip:1148: iiiiiiiieeeeeeeeIndex: Device-side assertion `ssssssss llllllllize' failed.
/pytorch/aten/src/ATen/native/hip/Indexing.hip:1148: iiiiiiiieeeeeeeeIndex: Device-side assertion `ssssssss llllllllize' failed.
/pytorch/aten/src/ATen/native/hip/Indexing.hip:1148: iiiiiiiieeeeeeeeIndex: Device-side assertion `ssssssss llllllllize' failed.
Downloading the model works fine and I assume loading the model at least into the GPUs VRAM also seems to work. With radeontop
(https://github.com/clbr/radeontop) I observed the GPU usage hitting 100% and the VRAM usage increasing until it stops at ~ 5 GB.
rocm-smi
outputs the following:
========================= ROCm System Management Interface =========================
=================================== Concise Info ===================================
GPU Temp (DieEdge) AvgPwr SCLK MCLK Fan Perf PwrCap VRAM% GPU%
0 49.0c 4.0W 0Mhz 100Mhz 0% auto 135.0W 19% 4%
====================================================================================
=============================== End of ROCm SMI Log ================================
I should also add that I need to set the environment variable HSA_OVERRIDE_GFX_VERSION=10.3.0
before executing/running InvokeAI or the test script to not end in a SEGFAULT. As far as I know that is needed in general if you use this generation of AMD GPUs to get them working at all with ROCm.
Invoke 3.2.0 still has the same issue.
@puresick Sorry for the late follow-up. The test script has no invokeai code in it - it's from the diffusers library: https://github.com/huggingface/diffusers
diffusers is the library that powers stable diffusion generation for invokeai.
I think this issue needs to be raised with them. I'm not sure if anybody on the invokeai team has access to an amd gpu to test.
Would you mind raising an issue with diffusers? Please link back to this issue. Thanks.
Is there an existing issue for this?
OS
Linux
GPU
amd
VRAM
8GB
What version did you experience this issue on?
3.0.2post1
What happened?
Using the Manual install and the Automated Install gives the same results. The installation is successful and the WebUI start up and is accessible. I can see the models I downloaded as options. But when I type "banana sushi" and click Invoke, the button starts scrolling like it is working, but it stays here at this point indefinitely. I have left it for over an hour and the status still shows "Generating" but never shows even the first pass/sample of the image.
Below is the console output from the time I started the WebUI to the point where it hangs indefinitely.
This is where it just stays indefinitely while the WebUI looks like it should be Generating.
Screenshots
Additional context
No response
Contact Details
No response