Skip to content
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

Incompatible Architecture issue when Converting Models to Core ML #6

Open
ankushagarwal opened this issue Dec 2, 2022 · 2 comments

Comments

@ankushagarwal
Copy link

ankushagarwal commented Dec 2, 2022

I am on an M1 Mac and created the conda environment using

CONDA_SUBDIR=osx-arm64 conda create -n coreml_stable_diffusion python=3.8 -y

Yet when I try to generate Core ML model files by running python -m python_coreml_stable_diffusion.torch2coreml --convert-unet, I run into this issue :

(mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))

Here's the full error:

ImportError: dlopen(/Users/kush/opt/miniconda3/envs/coreml_stable_diffusion/lib/python3.8/site-packages/tokenizers/tokenizers.cpython-38-darwin.so, 0x0002): 
tried: '/Users/kush/opt/miniconda3/envs/coreml_stable_diffusion/lib/python3.8/site-packages/tokenizers/tokenizers.cpython-38-darwin.so' 
(mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')),

'/System/Volumes/Preboot/Cryptexes/OS/Users/kush/opt/miniconda3/envs/coreml_stable_diffusion/lib/python3.8/site-packages/tokenizers/tokenizers.cpython-38-darwin.so' (no such file), 
'/Users/kush/opt/miniconda3/envs/coreml_stable_diffusion/lib/python3.8/site-packages/tokenizers/tokenizers.cpython-38-darwin.so' 
(mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
@adammarples
Copy link

You might need to build the tokenizers package from source huggingface/tokenizers#712

@ankushagarwal
Copy link
Author

Sounds good. Thanks @adammarples 🙏 - will give that a shot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants