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.
pschaldenbrand /style-clip-draw:d5a8394f
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 pschaldenbrand/style-clip-draw using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"pschaldenbrand/style-clip-draw:d5a8394f31789ab4da6f9783fc0884c28eb8929df345fa5aba2236ffcc78366c",
{
input: {
prompt: "A monkey dressed up like a cowboy",
num_paths: 400,
style_image: "https://replicate.delivery/mgxm/3c8fcad1-c5f6-4af1-a4f6-83e181eb72a9/fruit.jpg",
style_strength: 40
}
}
);
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 pschaldenbrand/style-clip-draw using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"pschaldenbrand/style-clip-draw:d5a8394f31789ab4da6f9783fc0884c28eb8929df345fa5aba2236ffcc78366c",
input={
"prompt": "A monkey dressed up like a cowboy",
"num_paths": 400,
"style_image": "https://replicate.delivery/mgxm/3c8fcad1-c5f6-4af1-a4f6-83e181eb72a9/fruit.jpg",
"style_strength": 40
}
)
# The pschaldenbrand/style-clip-draw model can stream output as it's running.
# The predict method returns an iterator, and you can iterate over that output.
for item in output:
# https://replicate.com/pschaldenbrand/style-clip-draw/api#output-schema
print(item)
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 pschaldenbrand/style-clip-draw 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": "d5a8394f31789ab4da6f9783fc0884c28eb8929df345fa5aba2236ffcc78366c",
"input": {
"prompt": "A monkey dressed up like a cowboy",
"num_paths": 400,
"style_image": "https://replicate.delivery/mgxm/3c8fcad1-c5f6-4af1-a4f6-83e181eb72a9/fruit.jpg",
"style_strength": 40
}
}' \
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": "2022-02-02T20:54:30.811936Z",
"created_at": "2022-02-02T20:49:44.004627Z",
"data_removed": false,
"error": null,
"id": "thnrev6dgfdprbopuqpq5himh4",
"input": {
"prompt": "A monkey dressed up like a cowboy",
"num_paths": 400,
"style_image": "https://replicate.delivery/mgxm/3c8fcad1-c5f6-4af1-a4f6-83e181eb72a9/fruit.jpg",
"style_strength": 40
},
"logs": "Iteration: 1 \tRender loss: 0.28564453125\nIteration: 21 \tRender loss: -0.13232421875\nIteration: 41 \tRender loss: -0.194091796875\nIteration: 61 \tRender loss: -0.233642578125\nIteration: 81 \tRender loss: -0.2384033203125\nIteration: 101 \tRender loss: -0.25439453125\nIteration: 121 \tRender loss: -0.25439453125\nIteration: 141 \tRender loss: -0.2386474609375\nIteration: 161 \tRender loss: -0.253662109375\nIteration: 181 \tRender loss: -0.276611328125\nIteration: 201 \tRender loss: -0.273681640625\nIteration: 221 \tRender loss: -0.27978515625\nIteration: 241 \tRender loss: -0.2841796875\nIteration: 261 \tRender loss: -0.2822265625\nIteration: 281 \tRender loss: -0.29541015625\nIteration: 301 \tRender loss: -0.295654296875\nIteration: 321 \tRender loss: -0.2998046875\nIteration: 341 \tRender loss: -0.28564453125\nIteration: 361 \tRender loss: -0.289306640625\nIteration: 381 \tRender loss: -0.292236328125\nIteration: 401 \tRender loss: -0.286376953125\nIteration: 421 \tRender loss: 0.157470703125\nIteration: 441 \tRender loss: 0.166015625\nIteration: 461 \tRender loss: 0.15966796875\nIteration: 481 \tRender loss: 0.154296875",
"metrics": {
"predict_time": 250.074002,
"total_time": 286.807309
},
"output": [
{
"file": "https://replicate.delivery/mgxm/4c65b2d3-d3bb-4382-81be-d4b4fef6f442/out.png"
},
{
"file": "https://replicate.delivery/mgxm/81aed386-6e04-4abd-bd03-ec6164bba60d/out.png"
},
{
"file": "https://replicate.delivery/mgxm/433bd5a9-7aa6-429e-9c5a-6a0a10362256/out.png"
},
{
"file": "https://replicate.delivery/mgxm/912cdd40-462d-4dc5-bacf-3629a78baf6e/out.png"
},
{
"file": "https://replicate.delivery/mgxm/311be3a3-9281-4cfb-8acb-02cd55739043/out.png"
},
{
"file": "https://replicate.delivery/mgxm/d17a4f5a-a673-4730-927e-c6f4ee50e693/out.png"
},
{
"file": "https://replicate.delivery/mgxm/1ca8da87-7e02-461a-bc8d-95ce13d60be3/out.png"
},
{
"file": "https://replicate.delivery/mgxm/efee4407-a87c-4333-a06b-fb50aec78f41/out.png"
},
{
"file": "https://replicate.delivery/mgxm/448ce9b9-63ea-4bcb-bd4d-0f1d66eff770/out.png"
},
{
"file": "https://replicate.delivery/mgxm/abc23d6f-9e0d-44f2-b5ac-b2ffa378a814/out.png"
},
{
"file": "https://replicate.delivery/mgxm/e942ac89-6e24-4eba-ba09-b2611d471222/out.png"
},
{
"file": "https://replicate.delivery/mgxm/e02b3446-7719-461f-a541-c5c40e272713/out.png"
},
{
"file": "https://replicate.delivery/mgxm/e3b21478-d477-4fdb-9ef9-a312cf74d965/out.png"
},
{
"file": "https://replicate.delivery/mgxm/0e4f04f7-5c71-4ea3-b8df-9adb7d2b3c12/out.png"
},
{
"file": "https://replicate.delivery/mgxm/bf094d0c-dd26-4f27-aa74-ca8908f1c53c/out.png"
},
{
"file": "https://replicate.delivery/mgxm/685dc7c2-621c-414c-b617-9d7f07bbffc2/out.png"
},
{
"file": "https://replicate.delivery/mgxm/7024fde6-9ea7-41e9-a762-aa5e8d3d1e65/out.png"
},
{
"file": "https://replicate.delivery/mgxm/01d2813e-3fd4-4118-a73d-efc4f87c95f0/out.png"
},
{
"file": "https://replicate.delivery/mgxm/c20d0aba-d03b-4fc3-9e5d-0157ec2f7b4d/out.png"
},
{
"file": "https://replicate.delivery/mgxm/dc7676f1-396c-4eb0-87ad-84f258520420/out.png"
},
{
"file": "https://replicate.delivery/mgxm/da123075-2047-4cbb-960e-5c542843de3b/out.png"
},
{
"file": "https://replicate.delivery/mgxm/da7faae1-4d83-4308-9137-d86dbd470d26/out.png"
},
{
"file": "https://replicate.delivery/mgxm/86dc6d46-9f8e-4b4d-a320-410d64a8353e/out.png"
},
{
"file": "https://replicate.delivery/mgxm/50793c1a-3df4-4ff2-b987-1d0c1469570d/out.png"
},
{
"file": "https://replicate.delivery/mgxm/a4da7f60-bff9-48c7-b96a-78734c1e335b/out.png"
}
],
"started_at": "2022-02-02T20:50:20.737934Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/thnrev6dgfdprbopuqpq5himh4",
"cancel": "https://api.replicate.com/v1/predictions/thnrev6dgfdprbopuqpq5himh4/cancel"
},
"version": "f9213994e4d1048aa24fe538d42c6594c30146a031af86b841f0eb6bc2154731"
}
Iteration: 1 Render loss: 0.28564453125
Iteration: 21 Render loss: -0.13232421875
Iteration: 41 Render loss: -0.194091796875
Iteration: 61 Render loss: -0.233642578125
Iteration: 81 Render loss: -0.2384033203125
Iteration: 101 Render loss: -0.25439453125
Iteration: 121 Render loss: -0.25439453125
Iteration: 141 Render loss: -0.2386474609375
Iteration: 161 Render loss: -0.253662109375
Iteration: 181 Render loss: -0.276611328125
Iteration: 201 Render loss: -0.273681640625
Iteration: 221 Render loss: -0.27978515625
Iteration: 241 Render loss: -0.2841796875
Iteration: 261 Render loss: -0.2822265625
Iteration: 281 Render loss: -0.29541015625
Iteration: 301 Render loss: -0.295654296875
Iteration: 321 Render loss: -0.2998046875
Iteration: 341 Render loss: -0.28564453125
Iteration: 361 Render loss: -0.289306640625
Iteration: 381 Render loss: -0.292236328125
Iteration: 401 Render loss: -0.286376953125
Iteration: 421 Render loss: 0.157470703125
Iteration: 441 Render loss: 0.166015625
Iteration: 461 Render loss: 0.15966796875
Iteration: 481 Render loss: 0.154296875
This example was created by a different version, pschaldenbrand/style-clip-draw:f9213994.