You're looking at a specific version of this model. Jump to the model overview.
williamyang1991 /gp-unit:08fe6617
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 williamyang1991/gp-unit using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"williamyang1991/gp-unit:08fe6617918a8ea931715badc5e5cc8abd7ddd76b26667ee323720ce2b2bac45",
{
input: {
task: "cat2dog",
style: "https://replicate.delivery/mgxm/05167c08-00de-4711-abfc-4d6a9edc9e12/flickr_dog_000572.jpg",
content: "https://replicate.delivery/mgxm/e47c3bad-7aa5-4e63-b035-7898c69a6ef5/flickr_cat_000418.jpg"
}
}
);
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 williamyang1991/gp-unit using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"williamyang1991/gp-unit:08fe6617918a8ea931715badc5e5cc8abd7ddd76b26667ee323720ce2b2bac45",
input={
"task": "cat2dog",
"style": "https://replicate.delivery/mgxm/05167c08-00de-4711-abfc-4d6a9edc9e12/flickr_dog_000572.jpg",
"content": "https://replicate.delivery/mgxm/e47c3bad-7aa5-4e63-b035-7898c69a6ef5/flickr_cat_000418.jpg"
}
)
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 williamyang1991/gp-unit 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": "08fe6617918a8ea931715badc5e5cc8abd7ddd76b26667ee323720ce2b2bac45",
"input": {
"task": "cat2dog",
"style": "https://replicate.delivery/mgxm/05167c08-00de-4711-abfc-4d6a9edc9e12/flickr_dog_000572.jpg",
"content": "https://replicate.delivery/mgxm/e47c3bad-7aa5-4e63-b035-7898c69a6ef5/flickr_cat_000418.jpg"
}
}' \
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/williamyang1991/gp-unit@sha256:08fe6617918a8ea931715badc5e5cc8abd7ddd76b26667ee323720ce2b2bac45 \
-i 'task="cat2dog"' \
-i 'style="https://replicate.delivery/mgxm/05167c08-00de-4711-abfc-4d6a9edc9e12/flickr_dog_000572.jpg"' \
-i 'content="https://replicate.delivery/mgxm/e47c3bad-7aa5-4e63-b035-7898c69a6ef5/flickr_cat_000418.jpg"'
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/williamyang1991/gp-unit@sha256:08fe6617918a8ea931715badc5e5cc8abd7ddd76b26667ee323720ce2b2bac45
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "task": "cat2dog", "style": "https://replicate.delivery/mgxm/05167c08-00de-4711-abfc-4d6a9edc9e12/flickr_dog_000572.jpg", "content": "https://replicate.delivery/mgxm/e47c3bad-7aa5-4e63-b035-7898c69a6ef5/flickr_cat_000418.jpg" } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Add a payment method to run this model.
Each run costs approximately $0.00022. Alternatively, try out our featured models for free.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2022-04-13T15:58:22.381187Z",
"created_at": "2022-04-13T15:56:27.811668Z",
"data_removed": false,
"error": null,
"id": "npv5o3clprd3faeqlfgfsdwmdi",
"input": {
"task": "cat2dog",
"style": "https://replicate.delivery/mgxm/05167c08-00de-4711-abfc-4d6a9edc9e12/flickr_dog_000572.jpg",
"content": "https://replicate.delivery/mgxm/e47c3bad-7aa5-4e63-b035-7898c69a6ef5/flickr_cat_000418.jpg"
},
"logs": null,
"metrics": {
"predict_time": 4.43487,
"total_time": 114.569519
},
"output": "https://replicate.delivery/mgxm/8edd71dc-a8a2-44ea-be0e-9c72c5cfff04/output.png",
"started_at": "2022-04-13T15:58:17.946317Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/npv5o3clprd3faeqlfgfsdwmdi",
"cancel": "https://api.replicate.com/v1/predictions/npv5o3clprd3faeqlfgfsdwmdi/cancel"
},
"version": "fde468de82c6b3b3174cd0f147757723a104688b5d0f9e22c2d6fa7045a1f8b4"
}
This example was created by a different version, williamyang1991/gp-unit:fde468de.