Skip to content

Commit b493e3e

Browse files
committed
up
1 parent 4ab9a72 commit b493e3e

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

backends/apple/coreml/runtime/delegate/ETCoreMLModelLoader.mm

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -74,23 +74,12 @@ + (nullable ETCoreMLModel *)loadModelWithContentsOfURL:(NSURL *)compiledModelURL
7474
ETCoreMLLogInfo("Storing asset with identifier=%@ in assetManager", identifier);
7575
asset = [assetManager storeAssetAtURL:compiledModelURL withIdentifier:identifier error:&localError];
7676
}
77-
78-
if (asset == nil) {
79-
ETCoreMLLogInfo("Failed to retrieve or store asset with identifier=%@ in assetManager", identifier);
80-
ETCoreMLLogInfo("compiledModelURL=%@", compiledModelURL);
81-
ETCoreMLLogInfo("error=%@", localError);
82-
ETCoreMLLogInfo("Attempting to fall back by loading model from compiledModelURL without transferring to assetManager");
83-
auto backingAsset = Asset::make(compiledModelURL, identifier, assetManager.fileManager, &localError);
84-
if (!backingAsset) {
85-
ETCoreMLLogInfo("Failed to create a backing asset with error=%@", localError);
86-
return nil;
87-
}
88-
asset = [[ETCoreMLAsset alloc] initWithBackingAsset:backingAsset.value()];
89-
}
90-
77+
9178
ETCoreMLModel *model;
9279
if (asset != nil) {
9380
model = [self loadModelWithCompiledAsset:asset configuration:configuration metadata:metadata error:&localError];
81+
} else {
82+
model = nil;
9483
}
9584

9685
if (model) {

0 commit comments

Comments
 (0)