Open SeanFrohman opened 1 year ago
I faced the same error when using v1.5 and a custom file URL as the model version.
I got the Swift CI version working right, but was trying to debug the constant 22-second overhead to "sample" images before passing them into the AI model. I hypothesized that using Swift instead of Python was the culprit, and switching to Python would remove the overhead.
I removed the force-specified --model-version
flag, and it automatically started re-downloaded the weights for (some unknown revision of Stable Diffusion?). I ended up quitting and staying on the Swift version. Still no idea why there's a 22-second overhead to "sample" that's larger than the 18-second throughput to "inference". I'm using a 32-core M1 Max.
I can make do with the total 40-second actual latency - it could be worse.
Hi @philipturner, that's one of the reasons why we wrote a standalone Swift app. The first generation takes a bit longer, but then each new image runs in ~10s in my M1 Max. I do get nil
images sometimes (they appear as an exclamation mark in the output area), I need to investigate what could be the reason.
FileNotFoundError: text_encoder CoreML model doesn't exist at /Users/seanfrohman/Documents/AI_MODELS/Stable_Diffusion_version_CompVis_stable-diffusion-v1-4_text_encoder.mlpackage
So if I go ahead and install without using --model-version stabilityai/stable-diffusion-2-base
It works fine during install, but then I get the error above when prompting to use the 2.0 service.
If I leave --model-version blank, 1.4 installs into ~/Documents/AI_MODELS and it works with 1.4 no problem.
Anyone have any idea here? I am almost done, other than a few small issues with the prompt.