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

Error computing NN outputs

Open martinlexow opened this issue 2 years ago • 2 comments

Tried to run the framework on my iPad (6th gen) and got the following error

[coreml] Error computing NN outputs -1
[coreml] Failure in -executePlan:error:.

Pipeline was initialised successfully however.

Tried using Unet chunks, reduced memory mode, added Extended Virtual Addressing and Increased Memory capabilities without luck.

Any advice would be welcomed!

martinlexow avatar Jan 05 '23 13:01 martinlexow

When I set modelConfig.computeUnits = .cpuOnly it seems to work at first but crashes later due to memory issues.

How can I know on which device I have to use .cpuOnly or .cpuAndGPU?

martinlexow avatar Jan 05 '23 13:01 martinlexow

I've seen a similar error using my own models.

The only way I got around it was to initialize the model once using a singleton. For some reason iOS is fine initializing the model once, but subsequent attempts would result in that error IIRC.

I don't know if that is the case here, but just thought I'd mention it in case it may help.

3DTOPO avatar Jan 06 '23 02:01 3DTOPO