init(contentsOf:options:)
Creates an Aimodel from a .aimodelor .aimodelc file.
Declaration
init(contentsOf modelURL: URL, options: SpecializationOptions = .default) async throwsParameters
- modelURL:
The URL of a
.aimodelor.aimodelcfile. - options:
Options for the specialization process.
Mentioned in
Discussion
This initializer specializes the model if needed, caching the result for future calls.
Specializing the model can take a significant amount of time depending on model size and the compute unit types it targets. This initializer always uses the default cache.