timothybrooks
/
instruct-pix2pix
Edit images with human instructions
Prediction
timothybrooks/instruct-pix2pix:30c1d0b9Input
- prompt
- turn him into cyborg
- scheduler
- K_EULER_ANCESTRAL
- num_outputs
- 1
- guidance_scale
- 7.5
- num_inference_steps
- 100
- image_guidance_scale
- 1.5
{ "image": "https://replicate.delivery/pbxt/IBnrzJD8Vvz3rD7yF5W8ODnpeA5wcoNpP1RRiDutqW1nG8eF/example.jpeg", "prompt": "turn him into cyborg", "scheduler": "K_EULER_ANCESTRAL", "num_outputs": 1, "guidance_scale": 7.5, "num_inference_steps": 100, "image_guidance_scale": 1.5 }
npm install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the clientimport Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run timothybrooks/instruct-pix2pix using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "timothybrooks/instruct-pix2pix:30c1d0b916a6f8efce20493f5d61ee27491ab2a60437c13c588468b9810ec23f", { input: { image: "https://replicate.delivery/pbxt/IBnrzJD8Vvz3rD7yF5W8ODnpeA5wcoNpP1RRiDutqW1nG8eF/example.jpeg", prompt: "turn him into cyborg", scheduler: "K_EULER_ANCESTRAL", num_outputs: 1, guidance_scale: 7.5, num_inference_steps: 100, image_guidance_scale: 1.5 } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the clientimport replicate
Run timothybrooks/instruct-pix2pix using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "timothybrooks/instruct-pix2pix:30c1d0b916a6f8efce20493f5d61ee27491ab2a60437c13c588468b9810ec23f", input={ "image": "https://replicate.delivery/pbxt/IBnrzJD8Vvz3rD7yF5W8ODnpeA5wcoNpP1RRiDutqW1nG8eF/example.jpeg", "prompt": "turn him into cyborg", "scheduler": "K_EULER_ANCESTRAL", "num_outputs": 1, "guidance_scale": 7.5, "num_inference_steps": 100, "image_guidance_scale": 1.5 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run timothybrooks/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": "30c1d0b916a6f8efce20493f5d61ee27491ab2a60437c13c588468b9810ec23f", "input": { "image": "https://replicate.delivery/pbxt/IBnrzJD8Vvz3rD7yF5W8ODnpeA5wcoNpP1RRiDutqW1nG8eF/example.jpeg", "prompt": "turn him into cyborg", "scheduler": "K_EULER_ANCESTRAL", "num_outputs": 1, "guidance_scale": 7.5, "num_inference_steps": 100, "image_guidance_scale": 1.5 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Install Cogbrew install cog
If you don’t have Homebrew, there are other installation options available.
Pull and run timothybrooks/instruct-pix2pix using Cog (this will download the full model and run it in your local environment):
cog predict r8.im/timothybrooks/instruct-pix2pix@sha256:30c1d0b916a6f8efce20493f5d61ee27491ab2a60437c13c588468b9810ec23f \ -i 'image="https://replicate.delivery/pbxt/IBnrzJD8Vvz3rD7yF5W8ODnpeA5wcoNpP1RRiDutqW1nG8eF/example.jpeg"' \ -i 'prompt="turn him into cyborg"' \ -i 'scheduler="K_EULER_ANCESTRAL"' \ -i 'num_outputs=1' \ -i 'guidance_scale=7.5' \ -i 'num_inference_steps=100' \ -i 'image_guidance_scale=1.5'
To learn more, take a look at the Cog documentation.
Pull and run timothybrooks/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/timothybrooks/instruct-pix2pix@sha256:30c1d0b916a6f8efce20493f5d61ee27491ab2a60437c13c588468b9810ec23f
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "image": "https://replicate.delivery/pbxt/IBnrzJD8Vvz3rD7yF5W8ODnpeA5wcoNpP1RRiDutqW1nG8eF/example.jpeg", "prompt": "turn him into cyborg", "scheduler": "K_EULER_ANCESTRAL", "num_outputs": 1, "guidance_scale": 7.5, "num_inference_steps": 100, "image_guidance_scale": 1.5 } }' \ http://localhost:5000/predictions
Output
{ "completed_at": "2023-01-24T00:12:09.338020Z", "created_at": "2023-01-24T00:12:01.075581Z", "data_removed": false, "error": null, "id": "j5myyosmjbcpjcqesowun6idie", "input": { "image": "https://replicate.delivery/pbxt/IBnrzJD8Vvz3rD7yF5W8ODnpeA5wcoNpP1RRiDutqW1nG8eF/example.jpeg", "prompt": "turn him into cyborg", "scheduler": "K_EULER_ANCESTRAL", "num_outputs": 1, "guidance_scale": 7.5, "num_inference_steps": 100, "image_guidance_scale": 1.5 }, "logs": "Using seed: 49287\n 0%| | 0/100 [00:00<?, ?it/s]\n 2%|▏ | 2/100 [00:00<00:08, 11.55it/s]\n 4%|▍ | 4/100 [00:00<00:07, 13.57it/s]\n 6%|▌ | 6/100 [00:00<00:06, 14.33it/s]\n 8%|▊ | 8/100 [00:00<00:06, 14.36it/s]\n 10%|█ | 10/100 [00:00<00:06, 14.37it/s]\n 12%|█▏ | 12/100 [00:00<00:06, 14.28it/s]\n 14%|█▍ | 14/100 [00:01<00:06, 13.74it/s]\n 16%|█▌ | 16/100 [00:01<00:06, 13.40it/s]\n 18%|█▊ | 18/100 [00:01<00:06, 13.54it/s]\n 20%|██ | 20/100 [00:01<00:05, 13.78it/s]\n 22%|██▏ | 22/100 [00:01<00:05, 14.24it/s]\n 24%|██▍ | 24/100 [00:01<00:05, 14.35it/s]\n 26%|██▌ | 26/100 [00:01<00:05, 14.23it/s]\n 28%|██▊ | 28/100 [00:02<00:05, 14.06it/s]\n 30%|███ | 30/100 [00:02<00:04, 14.07it/s]\n 32%|███▏ | 32/100 [00:02<00:04, 14.57it/s]\n 34%|███▍ | 34/100 [00:02<00:04, 14.28it/s]\n 36%|███▌ | 36/100 [00:02<00:04, 14.23it/s]\n 38%|███▊ | 38/100 [00:02<00:04, 14.30it/s]\n 40%|████ | 40/100 [00:02<00:04, 14.16it/s]\n 42%|████▏ | 42/100 [00:02<00:04, 14.41it/s]\n 44%|████▍ | 44/100 [00:03<00:03, 14.42it/s]\n 46%|████▌ | 46/100 [00:03<00:03, 14.46it/s]\n 48%|████▊ | 48/100 [00:03<00:03, 14.72it/s]\n 50%|█████ | 50/100 [00:03<00:03, 14.77it/s]\n 52%|█████▏ | 52/100 [00:03<00:03, 14.87it/s]\n 54%|█████▍ | 54/100 [00:03<00:03, 14.31it/s]\n 56%|█████▌ | 56/100 [00:03<00:02, 14.74it/s]\n 58%|█████▊ | 58/100 [00:04<00:02, 14.89it/s]\n 60%|██████ | 60/100 [00:04<00:02, 15.05it/s]\n 62%|██████▏ | 62/100 [00:04<00:02, 15.12it/s]\n 64%|██████▍ | 64/100 [00:04<00:02, 15.25it/s]\n 66%|██████▌ | 66/100 [00:04<00:02, 15.39it/s]\n 68%|██████▊ | 68/100 [00:04<00:02, 15.39it/s]\n 70%|███████ | 70/100 [00:04<00:01, 15.48it/s]\n 72%|███████▏ | 72/100 [00:04<00:01, 15.60it/s]\n 74%|███████▍ | 74/100 [00:05<00:01, 15.86it/s]\n 76%|███████▌ | 76/100 [00:05<00:01, 15.79it/s]\n 78%|███████▊ | 78/100 [00:05<00:01, 15.65it/s]\n 80%|████████ | 80/100 [00:05<00:01, 15.12it/s]\n 82%|████████▏ | 82/100 [00:05<00:01, 15.35it/s]\n 84%|████████▍ | 84/100 [00:05<00:01, 15.28it/s]\n 86%|████████▌ | 86/100 [00:05<00:00, 15.38it/s]\n 88%|████████▊ | 88/100 [00:05<00:00, 15.53it/s]\n 90%|█████████ | 90/100 [00:06<00:00, 15.26it/s]\n 92%|█████████▏| 92/100 [00:06<00:00, 14.85it/s]\n 94%|█████████▍| 94/100 [00:06<00:00, 14.59it/s]\n 96%|█████████▌| 96/100 [00:06<00:00, 14.70it/s]\n 98%|█████████▊| 98/100 [00:06<00:00, 14.25it/s]\n100%|██████████| 100/100 [00:06<00:00, 14.10it/s]\n100%|██████████| 100/100 [00:06<00:00, 14.61it/s]", "metrics": { "predict_time": 8.209128, "total_time": 8.262439 }, "output": [ "https://replicate.delivery/pbxt/kfL8fyBkHllh4kfEJbulrcnzWywUzZ2Fl1GkpXlb4n8xiaugA/out-0.png" ], "started_at": "2023-01-24T00:12:01.128892Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/j5myyosmjbcpjcqesowun6idie", "cancel": "https://api.replicate.com/v1/predictions/j5myyosmjbcpjcqesowun6idie/cancel" }, "version": "30c1d0b916a6f8efce20493f5d61ee27491ab2a60437c13c588468b9810ec23f" }
Generated inUsing seed: 49287 0%| | 0/100 [00:00<?, ?it/s] 2%|▏ | 2/100 [00:00<00:08, 11.55it/s] 4%|▍ | 4/100 [00:00<00:07, 13.57it/s] 6%|▌ | 6/100 [00:00<00:06, 14.33it/s] 8%|▊ | 8/100 [00:00<00:06, 14.36it/s] 10%|█ | 10/100 [00:00<00:06, 14.37it/s] 12%|█▏ | 12/100 [00:00<00:06, 14.28it/s] 14%|█▍ | 14/100 [00:01<00:06, 13.74it/s] 16%|█▌ | 16/100 [00:01<00:06, 13.40it/s] 18%|█▊ | 18/100 [00:01<00:06, 13.54it/s] 20%|██ | 20/100 [00:01<00:05, 13.78it/s] 22%|██▏ | 22/100 [00:01<00:05, 14.24it/s] 24%|██▍ | 24/100 [00:01<00:05, 14.35it/s] 26%|██▌ | 26/100 [00:01<00:05, 14.23it/s] 28%|██▊ | 28/100 [00:02<00:05, 14.06it/s] 30%|███ | 30/100 [00:02<00:04, 14.07it/s] 32%|███▏ | 32/100 [00:02<00:04, 14.57it/s] 34%|███▍ | 34/100 [00:02<00:04, 14.28it/s] 36%|███▌ | 36/100 [00:02<00:04, 14.23it/s] 38%|███▊ | 38/100 [00:02<00:04, 14.30it/s] 40%|████ | 40/100 [00:02<00:04, 14.16it/s] 42%|████▏ | 42/100 [00:02<00:04, 14.41it/s] 44%|████▍ | 44/100 [00:03<00:03, 14.42it/s] 46%|████▌ | 46/100 [00:03<00:03, 14.46it/s] 48%|████▊ | 48/100 [00:03<00:03, 14.72it/s] 50%|█████ | 50/100 [00:03<00:03, 14.77it/s] 52%|█████▏ | 52/100 [00:03<00:03, 14.87it/s] 54%|█████▍ | 54/100 [00:03<00:03, 14.31it/s] 56%|█████▌ | 56/100 [00:03<00:02, 14.74it/s] 58%|█████▊ | 58/100 [00:04<00:02, 14.89it/s] 60%|██████ | 60/100 [00:04<00:02, 15.05it/s] 62%|██████▏ | 62/100 [00:04<00:02, 15.12it/s] 64%|██████▍ | 64/100 [00:04<00:02, 15.25it/s] 66%|██████▌ | 66/100 [00:04<00:02, 15.39it/s] 68%|██████▊ | 68/100 [00:04<00:02, 15.39it/s] 70%|███████ | 70/100 [00:04<00:01, 15.48it/s] 72%|███████▏ | 72/100 [00:04<00:01, 15.60it/s] 74%|███████▍ | 74/100 [00:05<00:01, 15.86it/s] 76%|███████▌ | 76/100 [00:05<00:01, 15.79it/s] 78%|███████▊ | 78/100 [00:05<00:01, 15.65it/s] 80%|████████ | 80/100 [00:05<00:01, 15.12it/s] 82%|████████▏ | 82/100 [00:05<00:01, 15.35it/s] 84%|████████▍ | 84/100 [00:05<00:01, 15.28it/s] 86%|████████▌ | 86/100 [00:05<00:00, 15.38it/s] 88%|████████▊ | 88/100 [00:05<00:00, 15.53it/s] 90%|█████████ | 90/100 [00:06<00:00, 15.26it/s] 92%|█████████▏| 92/100 [00:06<00:00, 14.85it/s] 94%|█████████▍| 94/100 [00:06<00:00, 14.59it/s] 96%|█████████▌| 96/100 [00:06<00:00, 14.70it/s] 98%|█████████▊| 98/100 [00:06<00:00, 14.25it/s] 100%|██████████| 100/100 [00:06<00:00, 14.10it/s] 100%|██████████| 100/100 [00:06<00:00, 14.61it/s]
Prediction
timothybrooks/instruct-pix2pix:30c1d0b9IDdpnngy4vjbcfzowqe3iksnxpxyStatusSucceededSourceWebHardware–Total durationCreatedInput
- prompt
- Turn the humans into robots
- scheduler
- K_EULER_ANCESTRAL
- num_outputs
- 1
- guidance_scale
- "10"
- num_inference_steps
- "50"
- image_guidance_scale
- 1
{ "image": "https://replicate.delivery/pbxt/IC4rMszBZtp6EZSDEDZXzdo7iPcW1IR6yOEsX0kef4kJJusD/2.jpeg", "prompt": "Turn the humans into robots", "scheduler": "K_EULER_ANCESTRAL", "num_outputs": 1, "guidance_scale": "10", "num_inference_steps": "50", "image_guidance_scale": 1 }
npm install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the clientimport Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run timothybrooks/instruct-pix2pix using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "timothybrooks/instruct-pix2pix:30c1d0b916a6f8efce20493f5d61ee27491ab2a60437c13c588468b9810ec23f", { input: { image: "https://replicate.delivery/pbxt/IC4rMszBZtp6EZSDEDZXzdo7iPcW1IR6yOEsX0kef4kJJusD/2.jpeg", prompt: "Turn the humans into robots", scheduler: "K_EULER_ANCESTRAL", num_outputs: 1, guidance_scale: "10", num_inference_steps: "50", image_guidance_scale: 1 } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the clientimport replicate
Run timothybrooks/instruct-pix2pix using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "timothybrooks/instruct-pix2pix:30c1d0b916a6f8efce20493f5d61ee27491ab2a60437c13c588468b9810ec23f", input={ "image": "https://replicate.delivery/pbxt/IC4rMszBZtp6EZSDEDZXzdo7iPcW1IR6yOEsX0kef4kJJusD/2.jpeg", "prompt": "Turn the humans into robots", "scheduler": "K_EULER_ANCESTRAL", "num_outputs": 1, "guidance_scale": "10", "num_inference_steps": "50", "image_guidance_scale": 1 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run timothybrooks/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": "30c1d0b916a6f8efce20493f5d61ee27491ab2a60437c13c588468b9810ec23f", "input": { "image": "https://replicate.delivery/pbxt/IC4rMszBZtp6EZSDEDZXzdo7iPcW1IR6yOEsX0kef4kJJusD/2.jpeg", "prompt": "Turn the humans into robots", "scheduler": "K_EULER_ANCESTRAL", "num_outputs": 1, "guidance_scale": "10", "num_inference_steps": "50", "image_guidance_scale": 1 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Install Cogbrew install cog
If you don’t have Homebrew, there are other installation options available.
Pull and run timothybrooks/instruct-pix2pix using Cog (this will download the full model and run it in your local environment):
cog predict r8.im/timothybrooks/instruct-pix2pix@sha256:30c1d0b916a6f8efce20493f5d61ee27491ab2a60437c13c588468b9810ec23f \ -i 'image="https://replicate.delivery/pbxt/IC4rMszBZtp6EZSDEDZXzdo7iPcW1IR6yOEsX0kef4kJJusD/2.jpeg"' \ -i 'prompt="Turn the humans into robots"' \ -i 'scheduler="K_EULER_ANCESTRAL"' \ -i 'num_outputs=1' \ -i 'guidance_scale="10"' \ -i 'num_inference_steps="50"' \ -i 'image_guidance_scale=1'
To learn more, take a look at the Cog documentation.
Pull and run timothybrooks/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/timothybrooks/instruct-pix2pix@sha256:30c1d0b916a6f8efce20493f5d61ee27491ab2a60437c13c588468b9810ec23f
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "image": "https://replicate.delivery/pbxt/IC4rMszBZtp6EZSDEDZXzdo7iPcW1IR6yOEsX0kef4kJJusD/2.jpeg", "prompt": "Turn the humans into robots", "scheduler": "K_EULER_ANCESTRAL", "num_outputs": 1, "guidance_scale": "10", "num_inference_steps": "50", "image_guidance_scale": 1 } }' \ http://localhost:5000/predictions
Output
{ "completed_at": "2023-01-24T18:43:58.005697Z", "created_at": "2023-01-24T18:43:43.852289Z", "data_removed": false, "error": null, "id": "dpnngy4vjbcfzowqe3iksnxpxy", "input": { "image": "https://replicate.delivery/pbxt/IC4rMszBZtp6EZSDEDZXzdo7iPcW1IR6yOEsX0kef4kJJusD/2.jpeg", "prompt": "Turn the humans into robots", "scheduler": "K_EULER_ANCESTRAL", "num_outputs": 1, "guidance_scale": "10", "num_inference_steps": "50", "image_guidance_scale": 1 }, "logs": "Using seed: 5359\n 0%| | 0/50 [00:00<?, ?it/s]\n 2%|▏ | 1/50 [00:00<00:17, 2.79it/s]\n 4%|▍ | 2/50 [00:00<00:13, 3.44it/s]\n 6%|▌ | 3/50 [00:00<00:12, 3.71it/s]\n 8%|▊ | 4/50 [00:01<00:11, 3.85it/s]\n 10%|█ | 5/50 [00:01<00:11, 3.93it/s]\n 12%|█▏ | 6/50 [00:01<00:11, 3.99it/s]\n 14%|█▍ | 7/50 [00:01<00:10, 4.02it/s]\n 16%|█▌ | 8/50 [00:02<00:10, 4.04it/s]\n 18%|█▊ | 9/50 [00:02<00:10, 4.06it/s]\n 20%|██ | 10/50 [00:02<00:09, 4.07it/s]\n 22%|██▏ | 11/50 [00:02<00:09, 4.07it/s]\n 24%|██▍ | 12/50 [00:03<00:09, 4.08it/s]\n 26%|██▌ | 13/50 [00:03<00:09, 4.08it/s]\n 28%|██▊ | 14/50 [00:03<00:08, 4.09it/s]\n 30%|███ | 15/50 [00:03<00:08, 4.09it/s]\n 32%|███▏ | 16/50 [00:04<00:08, 4.09it/s]\n 34%|███▍ | 17/50 [00:04<00:08, 4.09it/s]\n 36%|███▌ | 18/50 [00:04<00:07, 4.09it/s]\n 38%|███▊ | 19/50 [00:04<00:07, 4.09it/s]\n 40%|████ | 20/50 [00:05<00:07, 4.09it/s]\n 42%|████▏ | 21/50 [00:05<00:07, 4.09it/s]\n 44%|████▍ | 22/50 [00:05<00:06, 4.09it/s]\n 46%|████▌ | 23/50 [00:05<00:06, 4.09it/s]\n 48%|████▊ | 24/50 [00:05<00:06, 4.09it/s]\n 50%|█████ | 25/50 [00:06<00:06, 4.09it/s]\n 52%|█████▏ | 26/50 [00:06<00:05, 4.09it/s]\n 54%|█████▍ | 27/50 [00:06<00:05, 4.09it/s]\n 56%|█████▌ | 28/50 [00:06<00:05, 4.09it/s]\n 58%|█████▊ | 29/50 [00:07<00:05, 4.09it/s]\n 60%|██████ | 30/50 [00:07<00:04, 4.09it/s]\n 62%|██████▏ | 31/50 [00:07<00:04, 4.09it/s]\n 64%|██████▍ | 32/50 [00:07<00:04, 4.09it/s]\n 66%|██████▌ | 33/50 [00:08<00:04, 4.09it/s]\n 68%|██████▊ | 34/50 [00:08<00:03, 4.09it/s]\n 70%|███████ | 35/50 [00:08<00:03, 4.09it/s]\n 72%|███████▏ | 36/50 [00:08<00:03, 4.09it/s]\n 74%|███████▍ | 37/50 [00:09<00:03, 4.09it/s]\n 76%|███████▌ | 38/50 [00:09<00:02, 4.09it/s]\n 78%|███████▊ | 39/50 [00:09<00:02, 4.09it/s]\n 80%|████████ | 40/50 [00:09<00:02, 4.09it/s]\n 82%|████████▏ | 41/50 [00:10<00:02, 4.09it/s]\n 84%|████████▍ | 42/50 [00:10<00:01, 4.09it/s]\n 86%|████████▌ | 43/50 [00:10<00:01, 4.09it/s]\n 88%|████████▊ | 44/50 [00:10<00:01, 4.09it/s]\n 90%|█████████ | 45/50 [00:11<00:01, 4.09it/s]\n 92%|█████████▏| 46/50 [00:11<00:00, 4.09it/s]\n 94%|█████████▍| 47/50 [00:11<00:00, 4.09it/s]\n 96%|█████████▌| 48/50 [00:11<00:00, 4.09it/s]\n 98%|█████████▊| 49/50 [00:12<00:00, 4.09it/s]\n100%|██████████| 50/50 [00:12<00:00, 4.09it/s]\n100%|██████████| 50/50 [00:12<00:00, 4.05it/s]", "metrics": { "predict_time": 14.10421, "total_time": 14.153408 }, "output": [ "https://replicate.delivery/pbxt/ti1JV696uTLZJtqyg3gbFGqvMUnO00vt8u8BGEgmPiT7Y3FE/out-0.png" ], "started_at": "2023-01-24T18:43:43.901487Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/dpnngy4vjbcfzowqe3iksnxpxy", "cancel": "https://api.replicate.com/v1/predictions/dpnngy4vjbcfzowqe3iksnxpxy/cancel" }, "version": "30c1d0b916a6f8efce20493f5d61ee27491ab2a60437c13c588468b9810ec23f" }
Generated inUsing seed: 5359 0%| | 0/50 [00:00<?, ?it/s] 2%|▏ | 1/50 [00:00<00:17, 2.79it/s] 4%|▍ | 2/50 [00:00<00:13, 3.44it/s] 6%|▌ | 3/50 [00:00<00:12, 3.71it/s] 8%|▊ | 4/50 [00:01<00:11, 3.85it/s] 10%|█ | 5/50 [00:01<00:11, 3.93it/s] 12%|█▏ | 6/50 [00:01<00:11, 3.99it/s] 14%|█▍ | 7/50 [00:01<00:10, 4.02it/s] 16%|█▌ | 8/50 [00:02<00:10, 4.04it/s] 18%|█▊ | 9/50 [00:02<00:10, 4.06it/s] 20%|██ | 10/50 [00:02<00:09, 4.07it/s] 22%|██▏ | 11/50 [00:02<00:09, 4.07it/s] 24%|██▍ | 12/50 [00:03<00:09, 4.08it/s] 26%|██▌ | 13/50 [00:03<00:09, 4.08it/s] 28%|██▊ | 14/50 [00:03<00:08, 4.09it/s] 30%|███ | 15/50 [00:03<00:08, 4.09it/s] 32%|███▏ | 16/50 [00:04<00:08, 4.09it/s] 34%|███▍ | 17/50 [00:04<00:08, 4.09it/s] 36%|███▌ | 18/50 [00:04<00:07, 4.09it/s] 38%|███▊ | 19/50 [00:04<00:07, 4.09it/s] 40%|████ | 20/50 [00:05<00:07, 4.09it/s] 42%|████▏ | 21/50 [00:05<00:07, 4.09it/s] 44%|████▍ | 22/50 [00:05<00:06, 4.09it/s] 46%|████▌ | 23/50 [00:05<00:06, 4.09it/s] 48%|████▊ | 24/50 [00:05<00:06, 4.09it/s] 50%|█████ | 25/50 [00:06<00:06, 4.09it/s] 52%|█████▏ | 26/50 [00:06<00:05, 4.09it/s] 54%|█████▍ | 27/50 [00:06<00:05, 4.09it/s] 56%|█████▌ | 28/50 [00:06<00:05, 4.09it/s] 58%|█████▊ | 29/50 [00:07<00:05, 4.09it/s] 60%|██████ | 30/50 [00:07<00:04, 4.09it/s] 62%|██████▏ | 31/50 [00:07<00:04, 4.09it/s] 64%|██████▍ | 32/50 [00:07<00:04, 4.09it/s] 66%|██████▌ | 33/50 [00:08<00:04, 4.09it/s] 68%|██████▊ | 34/50 [00:08<00:03, 4.09it/s] 70%|███████ | 35/50 [00:08<00:03, 4.09it/s] 72%|███████▏ | 36/50 [00:08<00:03, 4.09it/s] 74%|███████▍ | 37/50 [00:09<00:03, 4.09it/s] 76%|███████▌ | 38/50 [00:09<00:02, 4.09it/s] 78%|███████▊ | 39/50 [00:09<00:02, 4.09it/s] 80%|████████ | 40/50 [00:09<00:02, 4.09it/s] 82%|████████▏ | 41/50 [00:10<00:02, 4.09it/s] 84%|████████▍ | 42/50 [00:10<00:01, 4.09it/s] 86%|████████▌ | 43/50 [00:10<00:01, 4.09it/s] 88%|████████▊ | 44/50 [00:10<00:01, 4.09it/s] 90%|█████████ | 45/50 [00:11<00:01, 4.09it/s] 92%|█████████▏| 46/50 [00:11<00:00, 4.09it/s] 94%|█████████▍| 47/50 [00:11<00:00, 4.09it/s] 96%|█████████▌| 48/50 [00:11<00:00, 4.09it/s] 98%|█████████▊| 49/50 [00:12<00:00, 4.09it/s] 100%|██████████| 50/50 [00:12<00:00, 4.09it/s] 100%|██████████| 50/50 [00:12<00:00, 4.05it/s]
Prediction
timothybrooks/instruct-pix2pix:30c1d0b9IDqg3nkekctjhsdotu7xorwh3w24StatusSucceededSourceWebHardware–Total durationCreatedInput
- prompt
- replace the fruit with cakes
- scheduler
- DPMSolverMultistep
- num_outputs
- 1
- guidance_scale
- "10.47"
- num_inference_steps
- "50"
- image_guidance_scale
- 1.5
{ "image": "https://replicate.delivery/pbxt/IC527OFS14MxB6bRf4xVJVxMCoMEUg15BYvctDc029WqTupk/4.png", "prompt": "replace the fruit with cakes", "scheduler": "DPMSolverMultistep", "num_outputs": 1, "guidance_scale": "10.47", "num_inference_steps": "50", "image_guidance_scale": 1.5 }
npm install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the clientimport Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run timothybrooks/instruct-pix2pix using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "timothybrooks/instruct-pix2pix:30c1d0b916a6f8efce20493f5d61ee27491ab2a60437c13c588468b9810ec23f", { input: { image: "https://replicate.delivery/pbxt/IC527OFS14MxB6bRf4xVJVxMCoMEUg15BYvctDc029WqTupk/4.png", prompt: "replace the fruit with cakes", scheduler: "DPMSolverMultistep", num_outputs: 1, guidance_scale: "10.47", num_inference_steps: "50", image_guidance_scale: 1.5 } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the clientimport replicate
Run timothybrooks/instruct-pix2pix using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "timothybrooks/instruct-pix2pix:30c1d0b916a6f8efce20493f5d61ee27491ab2a60437c13c588468b9810ec23f", input={ "image": "https://replicate.delivery/pbxt/IC527OFS14MxB6bRf4xVJVxMCoMEUg15BYvctDc029WqTupk/4.png", "prompt": "replace the fruit with cakes", "scheduler": "DPMSolverMultistep", "num_outputs": 1, "guidance_scale": "10.47", "num_inference_steps": "50", "image_guidance_scale": 1.5 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variableexport REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run timothybrooks/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": "30c1d0b916a6f8efce20493f5d61ee27491ab2a60437c13c588468b9810ec23f", "input": { "image": "https://replicate.delivery/pbxt/IC527OFS14MxB6bRf4xVJVxMCoMEUg15BYvctDc029WqTupk/4.png", "prompt": "replace the fruit with cakes", "scheduler": "DPMSolverMultistep", "num_outputs": 1, "guidance_scale": "10.47", "num_inference_steps": "50", "image_guidance_scale": 1.5 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Install Cogbrew install cog
If you don’t have Homebrew, there are other installation options available.
Pull and run timothybrooks/instruct-pix2pix using Cog (this will download the full model and run it in your local environment):
cog predict r8.im/timothybrooks/instruct-pix2pix@sha256:30c1d0b916a6f8efce20493f5d61ee27491ab2a60437c13c588468b9810ec23f \ -i 'image="https://replicate.delivery/pbxt/IC527OFS14MxB6bRf4xVJVxMCoMEUg15BYvctDc029WqTupk/4.png"' \ -i 'prompt="replace the fruit with cakes"' \ -i 'scheduler="DPMSolverMultistep"' \ -i 'num_outputs=1' \ -i 'guidance_scale="10.47"' \ -i 'num_inference_steps="50"' \ -i 'image_guidance_scale=1.5'
To learn more, take a look at the Cog documentation.
Pull and run timothybrooks/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/timothybrooks/instruct-pix2pix@sha256:30c1d0b916a6f8efce20493f5d61ee27491ab2a60437c13c588468b9810ec23f
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "image": "https://replicate.delivery/pbxt/IC527OFS14MxB6bRf4xVJVxMCoMEUg15BYvctDc029WqTupk/4.png", "prompt": "replace the fruit with cakes", "scheduler": "DPMSolverMultistep", "num_outputs": 1, "guidance_scale": "10.47", "num_inference_steps": "50", "image_guidance_scale": 1.5 } }' \ http://localhost:5000/predictions
Output
{ "completed_at": "2023-01-24T18:55:09.539269Z", "created_at": "2023-01-24T18:55:05.137080Z", "data_removed": false, "error": null, "id": "qg3nkekctjhsdotu7xorwh3w24", "input": { "image": "https://replicate.delivery/pbxt/IC527OFS14MxB6bRf4xVJVxMCoMEUg15BYvctDc029WqTupk/4.png", "prompt": "replace the fruit with cakes", "scheduler": "DPMSolverMultistep", "num_outputs": 1, "guidance_scale": "10.47", "num_inference_steps": "50", "image_guidance_scale": 1.5 }, "logs": "Using seed: 36137\n 0%| | 0/50 [00:00<?, ?it/s]\n 4%|▍ | 2/50 [00:00<00:03, 12.25it/s]\n 8%|▊ | 4/50 [00:00<00:03, 13.50it/s]\n 12%|█▏ | 6/50 [00:00<00:03, 13.76it/s]\n 16%|█▌ | 8/50 [00:00<00:02, 14.06it/s]\n 20%|██ | 10/50 [00:00<00:02, 14.30it/s]\n 24%|██▍ | 12/50 [00:00<00:02, 14.46it/s]\n 28%|██▊ | 14/50 [00:00<00:02, 14.49it/s]\n 32%|███▏ | 16/50 [00:01<00:02, 14.43it/s]\n 36%|███▌ | 18/50 [00:01<00:02, 14.24it/s]\n 40%|████ | 20/50 [00:01<00:02, 14.21it/s]\n 44%|████▍ | 22/50 [00:01<00:01, 14.39it/s]\n 48%|████▊ | 24/50 [00:01<00:01, 14.46it/s]\n 52%|█████▏ | 26/50 [00:01<00:01, 14.56it/s]\n 56%|█████▌ | 28/50 [00:01<00:01, 14.64it/s]\n 60%|██████ | 30/50 [00:02<00:01, 14.67it/s]\n 64%|██████▍ | 32/50 [00:02<00:01, 14.73it/s]\n 68%|██████▊ | 34/50 [00:02<00:01, 14.68it/s]\n 72%|███████▏ | 36/50 [00:02<00:00, 14.56it/s]\n 76%|███████▌ | 38/50 [00:02<00:00, 14.59it/s]\n 80%|████████ | 40/50 [00:02<00:00, 14.58it/s]\n 84%|████████▍ | 42/50 [00:02<00:00, 14.64it/s]\n 88%|████████▊ | 44/50 [00:03<00:00, 14.70it/s]\n 92%|█████████▏| 46/50 [00:03<00:00, 14.75it/s]\n 96%|█████████▌| 48/50 [00:03<00:00, 14.79it/s]\n100%|██████████| 50/50 [00:03<00:00, 14.62it/s]\n100%|██████████| 50/50 [00:03<00:00, 14.46it/s]", "metrics": { "predict_time": 4.35592, "total_time": 4.402189 }, "output": [ "https://replicate.delivery/pbxt/1dh07nYW4n6vGNSlXpsDomiZeQ4Dm8n1sXfeo6kxxsXbc7ugA/out-0.png" ], "started_at": "2023-01-24T18:55:05.183349Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/qg3nkekctjhsdotu7xorwh3w24", "cancel": "https://api.replicate.com/v1/predictions/qg3nkekctjhsdotu7xorwh3w24/cancel" }, "version": "30c1d0b916a6f8efce20493f5d61ee27491ab2a60437c13c588468b9810ec23f" }
Generated inUsing seed: 36137 0%| | 0/50 [00:00<?, ?it/s] 4%|▍ | 2/50 [00:00<00:03, 12.25it/s] 8%|▊ | 4/50 [00:00<00:03, 13.50it/s] 12%|█▏ | 6/50 [00:00<00:03, 13.76it/s] 16%|█▌ | 8/50 [00:00<00:02, 14.06it/s] 20%|██ | 10/50 [00:00<00:02, 14.30it/s] 24%|██▍ | 12/50 [00:00<00:02, 14.46it/s] 28%|██▊ | 14/50 [00:00<00:02, 14.49it/s] 32%|███▏ | 16/50 [00:01<00:02, 14.43it/s] 36%|███▌ | 18/50 [00:01<00:02, 14.24it/s] 40%|████ | 20/50 [00:01<00:02, 14.21it/s] 44%|████▍ | 22/50 [00:01<00:01, 14.39it/s] 48%|████▊ | 24/50 [00:01<00:01, 14.46it/s] 52%|█████▏ | 26/50 [00:01<00:01, 14.56it/s] 56%|█████▌ | 28/50 [00:01<00:01, 14.64it/s] 60%|██████ | 30/50 [00:02<00:01, 14.67it/s] 64%|██████▍ | 32/50 [00:02<00:01, 14.73it/s] 68%|██████▊ | 34/50 [00:02<00:01, 14.68it/s] 72%|███████▏ | 36/50 [00:02<00:00, 14.56it/s] 76%|███████▌ | 38/50 [00:02<00:00, 14.59it/s] 80%|████████ | 40/50 [00:02<00:00, 14.58it/s] 84%|████████▍ | 42/50 [00:02<00:00, 14.64it/s] 88%|████████▊ | 44/50 [00:03<00:00, 14.70it/s] 92%|█████████▏| 46/50 [00:03<00:00, 14.75it/s] 96%|█████████▌| 48/50 [00:03<00:00, 14.79it/s] 100%|██████████| 50/50 [00:03<00:00, 14.62it/s] 100%|██████████| 50/50 [00:03<00:00, 14.46it/s]
Want to make some of these yourself?
Run this model