<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateML",
  "identifier" : "/documentation/CreateML/MLStyleTransfer",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Create ML"
    ],
    "preciseIdentifier" : "s:8CreateML15MLStyleTransferV"
  },
  "title" : "MLStyleTransfer"
}
-->

# MLStyleTransfer

A model you train to apply an image’s style to other images or videos.

```
struct MLStyleTransfer
```

## Topics

### Training a style transfer model asynchronously

[`train(trainingData:parameters:sessionParameters:)`](/documentation/CreateML/MLStyleTransfer/train(trainingData:parameters:sessionParameters:))

Begins an asynchronous style transfer model-training session.

[`makeTrainingSession(trainingData:parameters:sessionParameters:)`](/documentation/CreateML/MLStyleTransfer/makeTrainingSession(trainingData:parameters:sessionParameters:))

Creates an asynchronous training session for a style transfer model.

[`resume(_:)`](/documentation/CreateML/MLStyleTransfer/resume(_:))

Begins or continues an asynchronous style transfer model-training session.

[`restoreTrainingSession(sessionParameters:)`](/documentation/CreateML/MLStyleTransfer/restoreTrainingSession(sessionParameters:))

Creates an asynchronous training session for a style transfer model by restoring an existing training session’s
state from its parameters.

### Creating a style transfer model from a checkpoint

[`init(checkpoint:)`](/documentation/CreateML/MLStyleTransfer/init(checkpoint:))

Creates a style transfer model from a training session checkpoint.

### Training a style transfer model synchronously

[`init(trainingData:parameters:)`](/documentation/CreateML/MLStyleTransfer/init(trainingData:parameters:))

Creates a style transfer model with a training dataset represented by a
data source.

### Stylizing an image

[`stylize(image:)`](/documentation/CreateML/MLStyleTransfer/stylize(image:))

Applies the style the model learned to an image.

### Saving a style transfer model

[`write(to:metadata:)`](/documentation/CreateML/MLStyleTransfer/write(to:metadata:))

Exports the style transfer model as a Core ML model file to a location in the file system.

[`write(toFile:metadata:)`](/documentation/CreateML/MLStyleTransfer/write(toFile:metadata:))

Exports the style transfer model as a Core ML model file to the file path.

### Downloading model assets

[`downloadAssets()`](/documentation/CreateML/MLStyleTransfer/downloadAssets())

Initiates a download of the mlmodel assets required for Style Transfer training. This will be performed
automatically if needed at training time, but can be run independently prior to training.

### Describing a style transfer model

[`description`](/documentation/CreateML/MLStyleTransfer/description)

A text representation of the style transfer model.

[`debugDescription`](/documentation/CreateML/MLStyleTransfer/debugDescription)

A text representation of the style transfer model that’s suitable for
output during debugging.

[`playgroundDescription`](/documentation/CreateML/MLStyleTransfer/playgroundDescription)

A description of the style transfer model shown in a playground.

### Supporting types

[`MLStyleTransfer.DataSource`](/documentation/CreateML/MLStyleTransfer/DataSource)

A data source for a style transfer model.

[`MLStyleTransfer.ModelParameters`](/documentation/CreateML/MLStyleTransfer/ModelParameters)

Parameters that affect the training process of a style transfer model.



---

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)