Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run adirik/stylemc using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"adirik/stylemc:708f7bca82339e47999c6dcec9bae35e134997dc7cfa40108eea4e4f0defcfe7",
{
input: {
image: "https://replicate.delivery/pbxt/KX8JZ1ZTBj6oSh78QKOExLXcDGWV4eB5Z3z9gnFCmMMJxynH/stylemc_sample.jpg",
prompt: "a photo of a happy face",
change_alpha: 10,
id_loss_coeff: 2
}
}
);
console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run adirik/stylemc using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"adirik/stylemc:708f7bca82339e47999c6dcec9bae35e134997dc7cfa40108eea4e4f0defcfe7",
input={
"image": "https://replicate.delivery/pbxt/KX8JZ1ZTBj6oSh78QKOExLXcDGWV4eB5Z3z9gnFCmMMJxynH/stylemc_sample.jpg",
"prompt": "a photo of a happy face",
"change_alpha": 10,
"id_loss_coeff": 2
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run adirik/stylemc using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"version": "708f7bca82339e47999c6dcec9bae35e134997dc7cfa40108eea4e4f0defcfe7",
"input": {
"image": "https://replicate.delivery/pbxt/KX8JZ1ZTBj6oSh78QKOExLXcDGWV4eB5Z3z9gnFCmMMJxynH/stylemc_sample.jpg",
"prompt": "a photo of a happy face",
"change_alpha": 10,
"id_loss_coeff": 2
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Add a payment method to run this model.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2024-03-08T10:36:10.453537Z",
"created_at": "2024-03-08T10:31:10.389485Z",
"data_removed": false,
"error": null,
"id": "l4wc7irbonvd3mvio5trigoq3y",
"input": {
"image": "https://replicate.delivery/pbxt/KX8JZ1ZTBj6oSh78QKOExLXcDGWV4eB5Z3z9gnFCmMMJxynH/stylemc_sample.jpg",
"prompt": "a photo of a happy face",
"change_power": 8
},
"logs": "Setting up PyTorch plugin \"bias_act_plugin\"... Done.\nSetting up PyTorch plugin \"upfirdn2d_plugin\"... Done.",
"metrics": {
"predict_time": 50.611632,
"total_time": 300.064052
},
"output": "https://replicate.delivery/pbxt/QCxSSQm9H8JpDRZ45fC7ftfRVLnW7zebTQooVzFemFfrGcinE/output.jpg",
"started_at": "2024-03-08T10:35:19.841905Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/l4wc7irbonvd3mvio5trigoq3y",
"cancel": "https://api.replicate.com/v1/predictions/l4wc7irbonvd3mvio5trigoq3y/cancel"
},
"version": "e5b9cea4a37f39d14ee82a7ede7599183db1801980976c8eac92f571c33bd43f"
}
Setting up PyTorch plugin "bias_act_plugin"... Done.
Setting up PyTorch plugin "upfirdn2d_plugin"... Done.
This example was created by a different version, adirik/stylemc:e5b9cea4.