-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CKPT/Safetensors, already converted models #117
Comments
For already-converted ONNX models, if they work with the Stable Diffusion pipelines, I think they should work. Do you have anything in mind? Happy to test a few. You can add models by putting them in the For downloading and converting models from Civitai, I need to look into that. The code currently uses |
I meant ONNX models that I've already converted myself with different scripts that I used before, I'm not aware of any that are available on the internet. Thank you for clarifying about the naming convention, didn't realize that. |
I had some time to mess around with this and after hacking together some conversion code, I was able to convert and run a bunch of models from Civitai:
The conversion is two steps: from CKPT/Safetensors -> Diffusers directory -> ONNX models (in a directory). You don't need to convert Safetensors to CKPT, they were both loading just fine. The intermediate files are not deleted (yet), so it will take a little bit more disk space, but I started this project to learn/use ONNX for better or worse. 😁 I need to clean up the code, write something for the user guide, and finish some other TODOs before merging it, so the code is on https://github.com/ssube/onnx-web/tree/feat/117-convert-safetensors for now. If you want to try it with your own models, add them to the {
"diffusion": [
["diffusion-knollingcase", "Aybeeceedee/knollingcase"],
["diffusion-openjourney", "prompthero/openjourney"],
["diffusion-stably-diffused-onnx-v2-6", "../models/tensors/stablydiffuseds_26.safetensors"],
["diffusion-unstable-ink-dream-onnx-v6", "../models/tensors/unstableinkdream_v6.safetensors"]
],
"correction": [],
"upscaling": []
} |
I've cleaned up a few of the hacks and added a generic way to download models in the conversion script, with a section in the user guide: https://github.com/ssube/onnx-web/blob/feat/117-convert-safetensors/docs/user-guide.md#adding-your-own-models The {
"diffusion": [
{
"name": "diffusion-knollingcase",
"source": "Aybeeceedee/knollingcase"
},
{
"name": "diffusion-openjourney",
"source": "prompthero/openjourney"
},
{
"name": "diffusion-stablydiffused-aesthetic-v2-6",
"source": "civitai://6266?type=Pruned%20Model&format=SafeTensor",
"format": "safetensors"
},
{
"name": "diffusion-unstable-ink-dream-onnx-v6",
"source": "civitai://5796",
"format": "safetensors"
}
],
"correction": [],
"upscaling": [
{
"name": "upscaling-real-esrgan-x4-anime",
"source": "https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.2.4/RealESRGAN_x4plus_anime_6B.pth",
"scale": 4
}
]
} I'm reasonably happy with how this is working so far, but if you have any suggestions, lmk. Hope to merge this soon. |
This has been merged: #118 |
Is there any way to load already converted ONNX models, or somehow convert and load models like those found on civitai in the .ckpt/.safetensors format?
The text was updated successfully, but these errors were encountered: