ml-stable-diffusion icon indicating copy to clipboard operation
ml-stable-diffusion copied to clipboard

Crashed, when I run the ControlNet model on iPhone 14

Open jiangdi0924 opened this issue 2 years ago • 3 comments

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 avatar Apr 27 '23 07:04 jiangdi0924

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

SaladDays831 avatar Jun 22 '23 09:06 SaladDays831

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

jiangdi0924 avatar Jun 25 '23 05:06 jiangdi0924

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

SaladDays831 avatar Jun 28 '23 11:06 SaladDays831