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

Crashed, when I run the ControlNet model on iPhone 14 #171

Open
jiangdi0924 opened this issue Apr 27, 2023 · 3 comments
Open

Crashed, when I run the ControlNet model on iPhone 14 #171

jiangdi0924 opened this issue Apr 27, 2023 · 3 comments

Comments

@jiangdi0924
Copy link
Contributor

jiangdi0924 commented Apr 27, 2023

Thank you to all the contributors for their contributions that have allowed me to experience such an interesting package. I have developed an application that can run ml-stable-diffusion smoothly on iPhone14. However, I encountered some issues when trying to incorporate ControlNet features.

Problem description

When I run ControlNet on an actual iPhone 14 to generate images, it crashes due to excessive memory usage (it works fine on a simulator). Is there might be any incorrect settings when I converted the model?

python -m python_coreml_stable_diffusion.torch2coreml --convert-controlnet lllyasviel/sd-controlnet-scribble --unet-support-controlnet --convert-unet --convert-text-encoder --convert-vae-decoder --convert-vae-encoder -o sdv1_5_chunked_controlnet --model-version runwayml/stable-diffusion-v1-5 --bundle-resources-for-swift-cli --chunk-unet --attention-implementation SPLIT_EINSUM

Model
image

image

image

@jiangdi0924 jiangdi0924 changed the title The application crashes when I run the ControlNet model on iPhone 14 Crashed, when I run the ControlNet model on iPhone 14 Apr 27, 2023
@SaladDays831
Copy link

Hi @jiangdi0924 :)
Were you able to resolve this? If so - what model/conversion did you use?

@jiangdi0924
Copy link
Contributor Author

Hi @jiangdi0924 :) Were you able to resolve this? If so - what model/conversion did you use?

Not yet 🥶, I will test the new features (quantize-nbits) of ml-stable-difusion 1.0.0

@SaladDays831
Copy link

Ahhh, was hoping that you found a solution 😁
If you have any updates - pls ping!

We also have some discussions here that might help you

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