You're looking at a specific version of this model. Jump to the model overview.
arielreplicate /instruct-pix2pix:10e63b0e
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variableexport 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 arielreplicate/instruct-pix2pix using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"arielreplicate/instruct-pix2pix:10e63b0e6361eb23a0374f4d9ee145824d9d09f7a31dcd70803193ebc7121430",
{
input: {
seed: 87870,
cfg_text: 7.5,
cfg_image: 1.2,
resolution: 512,
input_image: "https://replicate.delivery/pbxt/IBklK64H3TVuGa6fXWW27kaQjp8cv9sBcFMfAqkQU8szqEkn/example.jpg",
instruction_text: "Turn him into a cyborg"
}
}
);
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 variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run arielreplicate/instruct-pix2pix using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"arielreplicate/instruct-pix2pix:10e63b0e6361eb23a0374f4d9ee145824d9d09f7a31dcd70803193ebc7121430",
input={
"seed": 87870,
"cfg_text": 7.5,
"cfg_image": 1.2,
"resolution": 512,
"input_image": "https://replicate.delivery/pbxt/IBklK64H3TVuGa6fXWW27kaQjp8cv9sBcFMfAqkQU8szqEkn/example.jpg",
"instruction_text": "Turn him into a cyborg"
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run arielreplicate/instruct-pix2pix 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": "10e63b0e6361eb23a0374f4d9ee145824d9d09f7a31dcd70803193ebc7121430",
"input": {
"seed": 87870,
"cfg_text": 7.5,
"cfg_image": 1.2,
"resolution": 512,
"input_image": "https://replicate.delivery/pbxt/IBklK64H3TVuGa6fXWW27kaQjp8cv9sBcFMfAqkQU8szqEkn/example.jpg",
"instruction_text": "Turn him into a cyborg"
}
}' \
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.
Pull and run arielreplicate/instruct-pix2pix using Cog (this will download the full model and run it in your local environment):
cog predict r8.im/arielreplicate/instruct-pix2pix@sha256:10e63b0e6361eb23a0374f4d9ee145824d9d09f7a31dcd70803193ebc7121430 \
-i 'seed=87870' \
-i 'cfg_text=7.5' \
-i 'cfg_image=1.2' \
-i 'resolution=512' \
-i 'input_image="https://replicate.delivery/pbxt/IBklK64H3TVuGa6fXWW27kaQjp8cv9sBcFMfAqkQU8szqEkn/example.jpg"' \
-i 'instruction_text="Turn him into a cyborg"'
To learn more, take a look at the Cog documentation.
Pull and run arielreplicate/instruct-pix2pix using Docker (this will download the full model and run it in your local environment):
docker run -d -p 5000:5000 --gpus=all r8.im/arielreplicate/instruct-pix2pix@sha256:10e63b0e6361eb23a0374f4d9ee145824d9d09f7a31dcd70803193ebc7121430
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "seed": 87870, "cfg_text": 7.5, "cfg_image": 1.2, "resolution": 512, "input_image": "https://replicate.delivery/pbxt/IBklK64H3TVuGa6fXWW27kaQjp8cv9sBcFMfAqkQU8szqEkn/example.jpg", "instruction_text": "Turn him into a cyborg" } }' \ http://localhost:5000/predictions
Add a payment method to run this model.
Each run costs approximately $0.050. Alternatively, try out our featured models for free.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2023-01-23T20:48:51.940515Z",
"created_at": "2023-01-23T20:48:41.902758Z",
"data_removed": false,
"error": null,
"id": "buladawu45dubb7iito27w7ofy",
"input": {
"seed": 87870,
"cfg_text": 7.5,
"cfg_image": 1.2,
"resolution": 512,
"input_image": "https://replicate.delivery/pbxt/IBklK64H3TVuGa6fXWW27kaQjp8cv9sBcFMfAqkQU8szqEkn/example.jpg",
"instruction_text": "Turn him into a cyborg"
},
"logs": null,
"metrics": {
"predict_time": 9.988164,
"total_time": 10.037757
},
"output": "https://replicate.delivery/pbxt/GLy9JdCsbpYMDhVWX89QM9Xcg42cBfbXKV43xgZfEMPzSKXQA/output.jpg",
"started_at": "2023-01-23T20:48:41.952351Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/buladawu45dubb7iito27w7ofy",
"cancel": "https://api.replicate.com/v1/predictions/buladawu45dubb7iito27w7ofy/cancel"
},
"version": "10e63b0e6361eb23a0374f4d9ee145824d9d09f7a31dcd70803193ebc7121430"
}