-
Notifications
You must be signed in to change notification settings - Fork 347
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
(wiki) Issue converting Stable Diffusion models to Core ML ... global_step key not found in model #261
Comments
I get the The other errors may be coming from a recent update to a python package. Sometimes an updated package breaks things. I just updated all my packages, and I'll see if I get either of the 2 long error you are getting. In the meantime, tell us when you set up your miniconda environment, and if you updated it after setting it up, when did you last update it. I know for sure that the diffusers package was updated in the past 24 hours, and prior update broke other packages until they were also updated. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
@jrittvo Thank you for the datapoints! I did a fresh install yesterday, following the guide @ https://github.com/godly-devotion/MochiDiffusion/wiki/How-to-convert-Stable-Diffusion-models-to-Core-ML to the letter ...
I have python 3.11.4 installed (via brew), but I saw your post above about
Later down on lines 1123-4 and 1404-5, there's this ...
... but commenting it out makes no difference. For purposes of testing, I'll use the https://civitai.com/models/22922/lyriel (a base model) and https://civitai.com/models/55543/dragonscaleai (a style). Test 1 - lyrielRunning Running
The Test 2 - dragonscaleaiRunning
No directory was created. -- The real question I think is how my |
Yes, that script is a good place to start. It comes from your Hugging Face updated You are running |
Here are some more datapoints ... A My
Here's my
|
@jrittvo Oh! Ok let's see. Running |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Bingo. I get your error using diffusers 0.17.0: RuntimeError: PyTorch convert function for op 'scaled_dot_product_attention' not implemented. Do you have about an hour now? If you can redo some of your setup, I will give you a file to use so that your miniconda environment uses package versions that have been working for people for a while. The new |
Yes, the files above are https://civitai.com/models/22922/lyriel (a base model) and https://civitai.com/models/55543/dragonscaleai (a style). Running Running |
Yes! I'd love to help. Chat somewhere? |
Do you use the Mochi Diffusion discord? |
This is not going to be that complicated. You know your way around this stuff I see. We just need to delete the miniconda |
I'm there now, in the #SUPPORT chat. |
Ok. Let me go there. I'm jrrjrr there. |
So the problem is diffusers version 0.17.0. Drop back to version 0.16.1 and the instructions in the wiki work again. If anyone reads this and needs help in downgrading their diffusers version, ask over on the Mochi discord where there are a few people who can help you out. |
With the releases of Apple's new |
Running Latest Version
Processor
M1 Max (or later)
Intel processor
No response
Memory
32GB
What happened?
Following the instructions on https://github.com/godly-devotion/MochiDiffusion/wiki/How-to-convert-Stable-Diffusion-models-to-Core-ML, I download ANY safetensor file from civitai.com (e.g. https://civitai.com/models/71745/conceptliquid-clothesliquid-dress or https://civitai.com/models/63655/tarot-cards-rider-waite), and run the
SD model → Diffusers
conversion ...python convert_original_stable_diffusion_to_diffusers.py --checkpoint_path LiquidClothesV1fixed.safetensors --from_safetensors --device cpu --extract_ema --dump_path LiquidClothesV1fixed_diffusers
... and no matter which file (out of ~20 random ones I tried), I receive an error starting with
global_step key not found in model
, for example:On rare occasions, a download conversion will spit out that key not found error, followed by a ton more, yet it creates the
_diffusers
directory. For example https://civitai.com/models/4468/counterfeit-v30 does this. On these rare occasions, if I try to run theDiffusers → MLMODELC
process, e.g. ...python -m python_coreml_stable_diffusion.torch2coreml --compute-unit CPU_AND_GPU --convert-vae-decoder --convert-vae-encoder --convert-unet --unet-support-controlnet --convert-text-encoder --model-version CounterfeitV30_v30_diffusers --bundle-resources-for-swift-cli --attention-implementation ORIGINAL -o CounterfeitV30_v30_original && python -m python_coreml_stable_diffusion.torch2coreml --compute-unit CPU_AND_GPU --convert-unet --model-version CounterfeitV30_v30_diffusers --bundle-resources-for-swift-cli --attention-implementation ORIGINAL -o CounterfeitV30_v30_original
... I get the following error:
Help? :)
Crash Log
No response
The text was updated successfully, but these errors were encountered: