Uminosachi / sd-webui-inpaint-anything

Inpaint Anything extension performs stable diffusion inpainting on a browser UI using masks from Segment Anything.
Apache License 2.0
1.09k stars 101 forks source link

Can't run segment anything #72

Open H68s12 opened 1 year ago

H68s12 commented 1 year ago

2023-07-09 05:44:30,912 - Inpaint Anything - INFO - input_image: (838, 672, 3) uint8 2023-07-09 05:44:31,675 - Inpaint Anything - INFO - SamAutomaticMaskGenerator sam_vit_b_01ec64.pth 2023-07-09 05:44:32,432 - Inpaint Anything - ERROR - The size of tensor a (0) must match the size of tensor b (256) at non-singleton dimension 1

Uminosachi commented 1 year ago

The issue does not reproduce. It may be due to an outdated torch package. Please delete the venv folder in stable-diffusion-webui, restart webui.bat or webui.sh, and reinstall the package.

H68s12 commented 1 year ago

I did that but the still the same error. Any other ideas what might be causing it? I am using and AMD gpu.

Uminosachi commented 1 year ago

I haven't had the opportunity to test this with AMD's GPU. Nonetheless, you may consider running it on your CPU by executing the following command:

webui.bat --use-cpu all --no-half --no-half-vae

Furthermore, there is a guide in the WebUI wiki that provides instructions on how to run the program with AMD GPUs. You may find this information helpful:

https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-AMD-GPUs#running-natively

Gui205 commented 1 year ago

I have the same issue, do you found an solution without use the CPU ?

Gui205 commented 1 year ago

I haven't had the opportunity to test this with AMD's GPU. Nonetheless, you may consider running it on your CPU by executing the following command:

webui.bat --use-cpu all --no-half --no-half-vae

Furthermore, there is a guide in the WebUI wiki that provides instructions on how to run the program with AMD GPUs. You may find this information helpful:

https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-AMD-GPUs#running-natively

I don't understand where i have to put this command ?

Uminosachi commented 1 year ago

I don't understand where i have to put this command ?

You can edit the webui-user.bat file directly and set the arguments for COMMANDLINE_ARGS to control the command line arguments. Here's how you can do it:

In the webui-user.bat file, add or modify the following line:

set COMMANDLINE_ARGS=--use-cpu all --no-half --no-half-vae

Save the file, and then you can run it by double-clicking the webui-user.bat file or executing it from the command line.

Gui205 commented 1 year ago

I don't understand where i have to put this command ?

You can edit the webui-user.bat file directly and set the arguments for COMMANDLINE_ARGS to control the command line arguments. Here's how you can do it:

In the webui-user.bat file, add or modify the following line:

set COMMANDLINE_ARGS=--use-cpu all --no-half --no-half-vae

Save the file, and then you can run it by double-clicking the webui-user.bat file or executing it from the command line.

Oh ok i see it's in user, i miss understood with the webui.

cheremo commented 1 year ago

conclusion for amd users: force the use of the CPU or buy a Nvidia card? :( i regret buying the 7900xtx

poweredmert commented 11 months ago

i don't understand how this can work on cpu easily but cannot work on amd gpus. the fact that you said "haven't had the opportunity to test this with AMD's GPU" shows how terrible it is to have an amd gpu for this hobby

Cyanus000 commented 9 months ago

conclusion for amd users: force the use of the CPU or buy a Nvidia card? :( i regret buying the 7900xtx

when i bought amd gpu, i only tended to play games, but later when i started to use stable diffusion, i realised it was a terrible choice. so many bugs and the VRAM utilization is too low

sasoriza commented 6 months ago

conclusion for amd users: force the use of the CPU or buy a Nvidia card? :( i regret buying the 7900xtx

when i bought amd gpu, i only tended to play games, but later when i started to use stable diffusion, i realised it was a terrible choice. so many bugs and the VRAM utilization is too low

Same :(