Skip to content

Instantly share code, notes, and snippets.

Last active September 28, 2021 14:27
What would you like to do?
// Fetch the StyleGAN model data from Hub
var modelData = await MLModelData.FromHub("@natsuite/style-gan");
// Create the model // This is actually being created server-side
var model = modelData.Deserialize();
// Create the StyleGAN Hub predictor
var predictor = new StyleGANHubPredictor(model);
// Run style transfer in the cloud using NatML Hub
Texture2D content = ..., style = ...;
Texture2D result = await predictor.Predict(content, style);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment