Method 1
Download the required models from the following repositories:
- https://huggingface.co/rocca/swin-ir-onnx
- This is the upscaler model.
- https://huggingface.co/runwayml/stable-diffusion-v1-5
- https://huggingface.co/softwareweaver/InstaFlow-0.9B-Olive-Onnx
- https://huggingface.co/SimianLuo/LCM_Dreamshaper_v7
- https://huggingface.co/softwareweaver/stable-diffusion-xl-base-1.0-Olive-Onnx
Note: Ensure you run git lfs install
before cloning the repository to ensure the models are downloaded correctly.
Method 2
Download Files
Experimental script
Note: The download-models.bat
file is not smart enough to know if you have already downloaded the models. If you need to re-download the models, please run the commands manually within git
to pull the latest changes from the target repository.
If your on mac or linux, you can open the
download-models.bat
file and run each command manually if you are unable to run the.bat
file.
Use the included download-models.bat
file to download the required models.
- The
download-models.bat
will create aonnx-models/
folder in current directory. Then it will download the required models into theonnx-models/
folder. - If you are unable to run the
.bat
file or have issues, you can open thedownload-models.bat
file and run each command manually. - The
.bat
file will not attempt to 're-download' or continue if the file already exists. If you need to re-download the models, delete theonnx-models/
folder and run the.bat
file again.
Stable Diffusion 1.5 - Get the .onnx files after download.
- After you download the
Stable Diffusion 1.5
model at: https://huggingface.co/runwayml/stable-diffusion-v1-5, check to see if any of the folders contain.onnx
files.- If none contain
.onnx
files, you will need to switch to the.onnx
branch.- If you have already checked out the
onnx
branch and have the.onnx
files from theStable Diffusion 1.5
repository, you can skip this step.
- If you have already checked out the
- If none contain
We need to switch to the onnx
branch to get the .onnx
files.
You can do this anyway you would like, or just run the following commands:
- Open a new command prompt in
onnx-models/stable-diffusion-v1-5/
git fetch origin
git checkout origin/onnx
It might take some time to switch branches and download all of the .onnx
files pending your internet speed.
- Update the paths in
appsettings.json
to point to the downloaded models. Update all the paths to point to the correct location of the downloaded models.- If the downloaded model repository does not contain a
Tokenizer
orTokenizer2
.onnx
file, leave the path empty.- Note: When the path is empty, OnnxStack will use it's own 'built-in' default tokenizer called
cliptokenizer.onnx
- Note: When the path is empty, OnnxStack will use it's own 'built-in' default tokenizer called
- Example with empty path:
- If the downloaded model repository does not contain a
{
"Type": "Tokenizer",
"OnnxModelPath": ""
},
{
"Type": "Tokenizer2",
"OnnxModelPath": ""
}
-
Q: My
.GIF
is flashing, is it supposed to do this? -
A: The
.GIF
area has been deprecated in favor of the 'video' features that are being added. Please ignore this example for now. -
Q: I am getting an error:
138 are out of bounds or can not be read in full
-
A: usually means the model is corrupt or has not been fully downloaded, make sure if you clone the repo you have git LFS installed, or you will just get small pointer files not the large GB files