Code Monkey home page Code Monkey logo

Comments (6)

MenKuch avatar MenKuch commented on July 30, 2024

Are you using the CPU+GPU or the Neural Engine for inference? When using the Neural Engine, it takes a really long time to re-compile the model. On your MacBook Pro, you should be able to use the CPU+GPU option which does not need recompilation.

from ml-stable-diffusion.

lamfan avatar lamfan commented on July 30, 2024

@MenKuch
After I set computeUnits = .cpuAndGPU, it only take 16s to start the app, thanks!

https://www.photoroom.com/inside-photoroom/core-ml-performance-2022#
results
chart

ANE + CPU is much more faster than GPU + CPU (about 500% increase), so how can we use it?
we are using coreml-stable-diffusion-v1-5 from huggingface, it is coreml model already, why does it need to re-compile the modal when running on ANE config, can we manual convert it? Many thanks!

from ml-stable-diffusion.

MenKuch avatar MenKuch commented on July 30, 2024

In my understanding, the initial compilation is necessary because the model has to be compiled for a specific ANE generation (i.e. the Neural Engine for the A14, A15, A16, M1 and so on)

from ml-stable-diffusion.

lamfan avatar lamfan commented on July 30, 2024

Is there anyway to speed up the loading when using .cpuAndNeuralEngine?
or other format not mlmodelc? It's not acceptable to compiled a model in 6 mins.....

from ml-stable-diffusion.

MenKuch avatar MenKuch commented on July 30, 2024

To my knowledge, there is currently no way of speeding up the process for a model. Worse: You seem to cannot get the progress of the conversion process so there is no way of letting the user know how long he has to wait.

from ml-stable-diffusion.

lamfan avatar lamfan commented on July 30, 2024

Ok, thank you!

from ml-stable-diffusion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.