My laptop is GPD Win Max 2 Windows 11. I have successfully installed stable-diffusion-webui-directml
. It can use AMD GPU to generate one 512x512 image in about 2.5 minutes. So that is not the CPU mode's 22 minutes. Here is the installation procedure.
As normal as every begin, install Anaconda in windows. Create environment as python 3.10.9. Then install pylint-venv. After that, we can launch the terminal. Git clone the stable-diffusion-webui-directml. If we run the webui.bat now, it will cause error said that does not have k-diffusion and stable-diffusion-stability-ai. cd to the repository folder, git clone the k-diffusion-directml and stability-ai's stable-diffusion, and replace the original folder.
If we now run the webui.bat, the system can be launched. But it will cause another error said "Allocate memory on GPU", and we don't have the CUDA for the system to allocate memory. Now we edit launch.py, goto line 265 like this line.
sys.argv, _ = extract_arg(sys.argv, '-f')
#add these lines:
sys.argv.append('--medvram')
sys.argv.append('--no-half')
sys.argv.append('--precision=full')
sys.argv.append('--opt-sub-quad-attention')
sys.argv.append('--opt-split-attention-v1')
sys.argv.append('--disable-nan-check')
Now we can run the webui.bat and it can generate image.