MLModelCollection.beginAccessing(identifier: "Collection Name") { result in
var modelURL: URL?
switch result {
case .success(let collection):
print(collection)
modelURL = collection.entries["io.aben.animegan2face.v1"]?.modelURL
case .failure(let error):
print(error)
}
print(modelURL as Any)
}
Got failure error:
MLModelCollection: namespace (animegan2face_paint_512_v2) registration failed. Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.triald.namespace-management was invalidated: failed at lookup with error 159 - Sandbox restriction." UserInfo={NSDebugDescription=The connection to service named com.apple.triald.namespace-management was invalidated: failed at lookup with error 159 - Sandbox restriction.}
Error Domain=com.apple.CoreML Code=10 "Failed to begin access for model collection with identifier 'animegan2face_paint_512_v2': invalid identifier" UserInfo={NSLocalizedDescription=Failed to begin access for model collection with identifier 'animegan2face_paint_512_v2': invalid identifier}
nil