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

2 Minutes for Pipeline

Open 3DTOPO opened this issue 3 years ago • 7 comments

It takes 2 minutes to instantiate the pipeline on a M1.

Seems to rule out use for all but the most curious early adapters. I spent an entire day on this because you claimed to create an image in about 30 seconds on an M1. But, it really should have included the fact that it takes 2 minutes for the pipeline to be ready.

Is there anyway to cache the state or something? Otherwise, I guess I'll write my time off as a loss.

3DTOPO avatar Dec 03 '22 20:12 3DTOPO

It does cache it for me once I run it once. aned goes crazy for a while, but once I've run the app once, subsequent runs are normal (instantiating the model takes a few seconds) I'm running within the context of an app, though so YMMV.

darknoon avatar Dec 03 '22 21:12 darknoon

I get that subsequent runs don't have to build the pipeline.

But app launch would.

3DTOPO avatar Dec 03 '22 21:12 3DTOPO

need a basic app example that runs on iPad M1 maybe, with Swift Playground, that could run in 1 session, load cache, and run with different prompt.

The challenge is to make it faster than DrawThingsAI app, which already runs on swift with custom models.

enzyme69 avatar Dec 04 '22 00:12 enzyme69

Well I haven't been able to get it to run at all on an iPad M1 yet.

3DTOPO avatar Dec 04 '22 03:12 3DTOPO

It states clearly in the readme that you need to use the swift version.

jordibruin avatar Dec 13 '22 15:12 jordibruin

I couldn't test it on iPad yet, but this open source demo app we released yesterday should work: https://github.com/huggingface/swift-coreml-diffusers

pcuenca avatar Dec 14 '22 20:12 pcuenca

It states clearly in the readme that you need to use the swift version.

And?

3DTOPO avatar Dec 15 '22 01:12 3DTOPO