---
title: "load(contentsOf:configuration:)"
framework: coreml
role: symbol
role_heading: Type Method
path: "coreml/mlmodel/load(contentsof:configuration:)"
---

# load(contentsOf:configuration:)

Construct a model asynchronously from a compiled model asset.

## Declaration

```swift
class func load(contentsOf url: URL, configuration: MLModelConfiguration = MLModelConfiguration()) async throws -> MLModel
```

## Parameters

- `url`: The URL of the compiled model asset derived from in-memory or on-disk Core ML model.
- `configuration`: The model configuration that hold options for loading the model.

## Return Value

Return Value The loaded model, if successful; otherwise, nil.

## See Also

### Loading a model

- [load(_:configuration:completionHandler:)](coreml/mlmodel/load(_:configuration:completionhandler:).md)
- [load(contentsOf:configuration:completionHandler:)](coreml/mlmodel/load(contentsof:configuration:completionhandler:).md)
- [init(contentsOf:)](coreml/mlmodel/init(contentsof:).md)
- [init(contentsOf:configuration:)](coreml/mlmodel/init(contentsof:configuration:).md)
- [init(contentsOfURL:)](coreml/mlmodel/init(contentsofurl:).md)
- [init(contentsOfURL:configuration:)](coreml/mlmodel/init(contentsofurl:configuration:).md)
