How to fix Automatic1111 DirectML on AMD 12/2023! Fix broken stable diffusion setup for ONNX/Olive

Published on:

Views: 0

Likes: 0

Tags:

stable diffusion
automatic1111
directml
onnx
olive
amd
amd gpu
sd on amd
broken automatic1111 amd gpu
Watch video on Youtube

*Update March 2024 -- better way to do this* https://youtu.be/n8RhNoAenvM Currently if you try to install Automatic1111 and are using the DirectML fork for AMD GPU's, you will get several errors. This show how to get around the broken pieces and be able to use Automatic1111 again. Install Git for windows: https://gitforwindows.org/ Install Python 3.10.6 for windows: https://www.python.org/downloads/release/python-3106/ *be sure to add to path!* Clone automatic1111 Directml: copy url for .git repo https://github.com/lshqqytiger/stable-diffusion-webui-directml run automatic1111 to create virtual environment run webui-user.bat file -- it will give an error fix errors: venv\Scripts\activate pip install -r requirements.txt pip install httpx==0.24.1 edit webui-user.bat file inside of automatic1111 folder and add command line arguments and save: --use-directml --onnx Inside of automatic1111 folder find modules\sd_models.py file, edit it comment out lines 632 - 635 by putting a # in front of the lines and save file close out Automatic1111 Now you can run Automatic1111 by double-clicking on the webui-user.bat file from windows, or make a shortcut to it if you prefer. Automatic1111 should now work the way it used to and should allow optimizing ONNX models.