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:e5b9cea4a37f39d14ee82a7ede7599183db1801980976c8eac92f571c33bd43f",
{
input: {
image: "https://replicate.delivery/pbxt/KX8JZ1ZTBj6oSh78QKOExLXcDGWV4eB5Z3z9gnFCmMMJxynH/stylemc_sample.jpg",
prompt: "a photo of a happy face",
change_power: 8
}
}
);
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:e5b9cea4a37f39d14ee82a7ede7599183db1801980976c8eac92f571c33bd43f",
input={
"image": "https://replicate.delivery/pbxt/KX8JZ1ZTBj6oSh78QKOExLXcDGWV4eB5Z3z9gnFCmMMJxynH/stylemc_sample.jpg",
"prompt": "a photo of a happy face",
"change_power": 8
}
)
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": "e5b9cea4a37f39d14ee82a7ede7599183db1801980976c8eac92f571c33bd43f",
"input": {
"image": "https://replicate.delivery/pbxt/KX8JZ1ZTBj6oSh78QKOExLXcDGWV4eB5Z3z9gnFCmMMJxynH/stylemc_sample.jpg",
"prompt": "a photo of a happy face",
"change_power": 8
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
brew install cog
If you don’t have Homebrew, there are other installation options available.
Run this to download the model and run it in your local environment:
cog predict r8.im/adirik/stylemc@sha256:e5b9cea4a37f39d14ee82a7ede7599183db1801980976c8eac92f571c33bd43f \
-i 'image="https://replicate.delivery/pbxt/KX8JZ1ZTBj6oSh78QKOExLXcDGWV4eB5Z3z9gnFCmMMJxynH/stylemc_sample.jpg"' \
-i 'prompt="a photo of a happy face"' \
-i 'change_power=8'
To learn more, take a look at the Cog documentation.
Run this to download the model and run it in your local environment:
docker run -d -p 5000:5000 --gpus=all r8.im/adirik/stylemc@sha256:e5b9cea4a37f39d14ee82a7ede7599183db1801980976c8eac92f571c33bd43f
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "image": "https://replicate.delivery/pbxt/KX8JZ1ZTBj6oSh78QKOExLXcDGWV4eB5Z3z9gnFCmMMJxynH/stylemc_sample.jpg", "prompt": "a photo of a happy face", "change_power": 8 } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
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.