lshqqytiger / stable-diffusion-webui-amdgpu

Stable Diffusion web UI
GNU Affero General Public License v3.0
1.8k stars 186 forks source link

[Bug]: Inpaint and no-half #300

Open SunGreen777 opened 12 months ago

SunGreen777 commented 12 months ago

Is there an existing issue for this?

What happened?

Help me, please. I own a radeon rx570 8gb. -no-half, does not allow rendering at high resolutions With -no-half missing, inpaint doesn't work. The alternative --upcast-sampling has no effect.

Processor: AMD Ryzen 5 3600 GPU: AMD Radeon RX 570 8GB RAM: 32GB Storage: m2 - 512gb OS: Windows 11

Steps to reproduce the problem

Remove the -no-half argument, check that inpaint works Add argument -no-half try to create image 768x768 or +

What should have happened?

Inpaint should work and render at high resolutions

Sysinfo

A1111 Windows 11 - 32ram sysinfo-2023-10-10-14-01.txt

What browsers do you use to access the UI ?

Other

Console logs

--- go Additional information >>

Additional information

There are no errors console, Without a no-half argument. In UI no result, or have spotting image

DivanoDova commented 11 months ago

It's a known issue you need --no-half to inpaint (also you need to set negative guidance sigma to 0 if it set to higher it also doesn't work) I think that 768x768 is a bit too much for your GPU For your rx570 try with--medvram --precision full --no-half --no-half-vae

I'm on a rx6600 i can do txt2img at 560x840 (i can go a little bit higher but it will take too long for me) with --medvram --opt-sdp-attention --upcast-sampling and i need to switch back to -no-halfif i want to inpaint.

SunGreen777 commented 11 months ago

I put two .bats with different configs in SD. (they can be renamed) One for Inpaint the second for generation 1280/720px OK

1) * @echo off set PYTHON= set GIT= set VENV_DIR= set GIT_SSL_NO_VERIFY=true git pull set COMMANDLINE_ARGS= --medvram --opt-sdp-no-mem-attention --api set SAFETENSORS_FAST_GPU=1 call webui.bat

2) - inpaint * @echo off set PYTHON= set GIT= set VENV_DIR= set GIT_SSL_NO_VERIFY=true git pull set COMMANDLINE_ARGS= --opt-sub-quad-attention --medvram --api --no-half --disable-nan-check set SAFETENSORS_FAST_GPU=1 call webui.bat

vufper45 commented 11 months ago

I have same issue. Unfortunatelly, i don't remember the version i was on but i installed SD on May 20 and never did git pull after. I was able to render and inpaint up to 512x768 with argument --medvram --precision full --no-half. Somewhere in September i decided to do git pull and with all improvements i noticed that with same arguments the vram usage increased drastically. I tried different set of arguments (--opt-split-attention --no-half-vae --disable-nan-check) but it broke inpainting and ADetailer, i hope this will be fixed someday because it is tricky to change arguments every time i want to inpaint and set resolution about 400x400 max (i have rx6600m 8 gb)

songib commented 11 months ago

Yep, It's been there since the beginning of time. It's directML issue I think.

xhy2008 commented 11 months ago

I have the same problem,both in img2img and in/outpainting. My GPU has only 4GB of VRAM,so no-half is not able to use.

mr-september commented 8 months ago

Just adding another possibly useless report that upcast sampling kills inpainting with AMD 5700, directml and Windows.

Would be nice if there was more visibility around this incompatibility, for example mentioned in the arguments wiki. It's a commonly suggested parameter for AMD GPUs on Reddit, without mention of Linux or otherwise.