fast-style-transfer-coreml icon indicating copy to clipboard operation
fast-style-transfer-coreml copied to clipboard

[coreml] MLModelAsset: load failed with error

Open aloveric opened this issue 7 years ago • 13 comments

Import your CoreML and run iOS code, it has this issue:

screen shot 2018-01-21 at 10 38 18 pm

aloveric avatar Jan 21 '18 14:01 aloveric

BTW, Simulation works fine, error on real iPhone

aloveric avatar Jan 21 '18 16:01 aloveric

I’ll give it a check, what is the iOS version on the phone?

On Sun, Jan 21, 2018 at 11:13 AM Eric Woo [email protected] wrote:

BTW, Simulation works fine, error on real iPhone

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mdramos/fast-style-transfer-coreml/issues/1#issuecomment-359259702, or mute the thread https://github.com/notifications/unsubscribe-auth/AG6KHTZKNg3Q4mDjM3lI8OB4_ziHRF7rks5tM2I1gaJpZM4Rl1n0 .

backnotprop avatar Jan 21 '18 17:01 backnotprop

@mdramos Thanks for your quick feedback. It is iPhone 6 and iOS 11.1.2. Also check with iPad Air 2 on iOS 11.1.2 with same issue.

aloveric avatar Jan 22 '18 02:01 aloveric

related: https://forums.developer.apple.com/thread/82700

backnotprop avatar Jan 22 '18 18:01 backnotprop

Also found this but there is no solution to fix it ...

aloveric avatar Jan 22 '18 18:01 aloveric

i run the code on my iphoneX but its not work well but good with iphone7P and Simulation

jst000000 avatar Jan 30 '18 04:01 jst000000

I'm getting better results with lazy loading the models separately, still experiencing some memory issues, so I will continue to look for a better solution.

The first step in the right direction definitely seems to be lazy loading.

backnotprop avatar Jan 30 '18 16:01 backnotprop

actually, a single model in memory seems to work best without issues. Just nil-ing out old models and keeping one in memory.

Ill push this fix in a bit, but will hopefully find a better solution for having multiple models loaded in memory.

backnotprop avatar Jan 30 '18 16:01 backnotprop

yes, most of phone work well with two models but break with three

jst000000 avatar Jan 31 '18 03:01 jst000000

screen shot 2018-02-01 at 5 42 15 pm

Guys, I left only one model and it will get whole black screen with loading then show the lock screen via iPhone 6 and iOS 11.1.2

aloveric avatar Feb 01 '18 09:02 aloveric

Running on simulator only but not in real device? please suggest why? Even though device is running with iOS 11.0

mithileshggn avatar Nov 28 '18 07:11 mithileshggn

Screenshot 2020-02-13 at 2 59 38 PM

Way not run in Real Device?

bbthitenp avatar Feb 13 '20 09:02 bbthitenp

Hey all, I see folks stay actively commenting here.

The models this produce are most likely too large for devices. A new architecture needs to be slimmed down and there have been many advancements/examples to do this.

Im going to archive the repo, as I can not maintain and this should be used as experimentation only.

backnotprop avatar Feb 15 '20 14:02 backnotprop