model(for:options:)
Returns a previously specialized model from the cache, if available.
Declaration
final func model(for modelURL: URL, options: SpecializationOptions) throws -> AIModel?Parameters
- modelURL:
The URL of an
.aimodelfile that you previously specialized. - options:
The specialization options to match against.
Mentioned in
Return Value
The model if a matching cache entry exists, or nil otherwise.
Discussion
If this cache holds a specialized asset from previously specializing the model at modelURL with the specified options, this method loads and returns the model. This method never performs specialization.