apple / ml-stable-diffusion

Stable Diffusion with Core ML on Apple Silicon
MIT License
16.95k stars 947 forks source link

Custom models #97

Open magarcan opened 1 year ago

magarcan commented 1 year ago

I've found there is a ton of interesting models within: civitai.com

Most of the are CHECKPOINTs using SD 1.5 as a base.

I've tried importing .cpkt file but get "The file "merges.txt" couldn't be expend" error.

How can I use this models?

RahulBhalley commented 1 year ago

I think coreml conversion script takes repo string of model on HuggingFace.

How do you import .ckpt file and where do u load it?

pedx78 commented 1 year ago

what i did was convert .ckpt to diffusers format first, then convert diffusers to coreml

Theres a script on hugging face github repo that does conversion.

magarcan commented 1 year ago

I think coreml conversion script takes repo string of model on HuggingFace.

How do you import .ckpt file and where do u load it?

I just download the .CPKT file and import into Mochi Duffusion using settings...

what i did was convert .ckpt to diffusers format first, then convert diffusers to coreml

Theres a script on hugging face github repo that does conversion.

Can you share the link to convert the models?

RahulBhalley commented 1 year ago

I just download the .CPKT file and import into Mochi Duffusion using settings...

MochiDiffusion's author say here that model should be converted to CoreML before using. I tried to convert one SD model and to run any model sets I found that they must be converted to mlmodelc as well instead of just mlpackage that apple/ml-stable-diffusion script does by default. Must be renamed as well.

godly-devotion commented 1 year ago

I just download the .CPKT file and import into Mochi Duffusion using settings...

MochiDiffusion's author say here that model should be converted to CoreML before using. I tried to convert one SD model and to run any model sets I found that they must be converted to mlmodelc as well instead of just mlpackage that apple/ml-stable-diffusion script does by default. Must be renamed as well.

Sorry I forgot to add some information regarding this. Apple conversion script creates mlpackage files in the export directory but the mlmodelc files that you actually want are under the Resources folder.