<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.14.0 -",
    "tvOS: 12.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreML",
  "identifier" : "/documentation/CoreML/MLImageSizeConstraintType",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Core ML"
    ],
    "preciseIdentifier" : "c:@E@MLImageSizeConstraintType"
  },
  "title" : "MLImageSizeConstraintType"
}
-->

# MLImageSizeConstraintType

The modes that determine how the model defines a feature’s image size constraint.

```
enum MLImageSizeConstraintType
```

## Topics

### Constraint types

[`MLImageSizeConstraintType.range`](/documentation/CoreML/MLImageSizeConstraintType/range)

The image feature accepts image sizes defined by a range of widths and a range of heights.

[`MLImageSizeConstraintType.enumerated`](/documentation/CoreML/MLImageSizeConstraintType/enumerated)

The image feature accepts image sizes listed in an array.

[`MLImageSizeConstraintType.unspecified`](/documentation/CoreML/MLImageSizeConstraintType/unspecified)

The image size constraint is not configured and should be ignored.

### Creating a constraint type

[`init(rawValue:)`](/documentation/CoreML/MLImageSizeConstraintType/init(rawValue:))



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)