jarrentwu1031 / ccpl
Contrastive Coherence Preserving Loss for Versatile Style Transfer (Updated 2 years, 10 months ago)
Prediction
jarrentwu1031/ccpl:ee98cd06c1febf78a7d5a7888fd1cf134f22a14e795efe3b6e14e8f2dac3df46IDtx33twhdobd53lb7zrukqhc2jyStatusSucceededSourceWebHardware–Total durationCreatedInput
{ "mode": "art", "style": "https://replicate.delivery/mgxm/e6ceb14e-95e3-4896-a5d3-a4e1762ca5d1/3.jpg", "content": "https://replicate.delivery/mgxm/808d4433-623b-48cf-9701-1e3975c28324/in2.jpg", "style_size": 0, "content_size": 0 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run jarrentwu1031/ccpl using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "jarrentwu1031/ccpl:ee98cd06c1febf78a7d5a7888fd1cf134f22a14e795efe3b6e14e8f2dac3df46", { input: { mode: "art", style: "https://replicate.delivery/mgxm/e6ceb14e-95e3-4896-a5d3-a4e1762ca5d1/3.jpg", content: "https://replicate.delivery/mgxm/808d4433-623b-48cf-9701-1e3975c28324/in2.jpg", style_size: 0, content_size: 0 } } ); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run jarrentwu1031/ccpl using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "jarrentwu1031/ccpl:ee98cd06c1febf78a7d5a7888fd1cf134f22a14e795efe3b6e14e8f2dac3df46", input={ "mode": "art", "style": "https://replicate.delivery/mgxm/e6ceb14e-95e3-4896-a5d3-a4e1762ca5d1/3.jpg", "content": "https://replicate.delivery/mgxm/808d4433-623b-48cf-9701-1e3975c28324/in2.jpg", "style_size": 0, "content_size": 0 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run jarrentwu1031/ccpl 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": "jarrentwu1031/ccpl:ee98cd06c1febf78a7d5a7888fd1cf134f22a14e795efe3b6e14e8f2dac3df46", "input": { "mode": "art", "style": "https://replicate.delivery/mgxm/e6ceb14e-95e3-4896-a5d3-a4e1762ca5d1/3.jpg", "content": "https://replicate.delivery/mgxm/808d4433-623b-48cf-9701-1e3975c28324/in2.jpg", "style_size": 0, "content_size": 0 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
You can run this model locally using Cog. First, install Cog: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/jarrentwu1031/ccpl@sha256:ee98cd06c1febf78a7d5a7888fd1cf134f22a14e795efe3b6e14e8f2dac3df46 \ -i 'mode="art"' \ -i 'style="https://replicate.delivery/mgxm/e6ceb14e-95e3-4896-a5d3-a4e1762ca5d1/3.jpg"' \ -i 'content="https://replicate.delivery/mgxm/808d4433-623b-48cf-9701-1e3975c28324/in2.jpg"' \ -i 'style_size=0' \ -i 'content_size=0'
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/jarrentwu1031/ccpl@sha256:ee98cd06c1febf78a7d5a7888fd1cf134f22a14e795efe3b6e14e8f2dac3df46
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "mode": "art", "style": "https://replicate.delivery/mgxm/e6ceb14e-95e3-4896-a5d3-a4e1762ca5d1/3.jpg", "content": "https://replicate.delivery/mgxm/808d4433-623b-48cf-9701-1e3975c28324/in2.jpg", "style_size": 0, "content_size": 0 } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Output
{ "completed_at": "2022-08-02T04:54:42.865952Z", "created_at": "2022-08-02T04:54:41.694598Z", "data_removed": false, "error": null, "id": "tx33twhdobd53lb7zrukqhc2jy", "input": { "mode": "art", "style": "https://replicate.delivery/mgxm/e6ceb14e-95e3-4896-a5d3-a4e1762ca5d1/3.jpg", "content": "https://replicate.delivery/mgxm/808d4433-623b-48cf-9701-1e3975c28324/in2.jpg", "style_size": 0, "content_size": 0 }, "logs": null, "metrics": { "predict_time": 1.016226, "total_time": 1.171354 }, "output": "https://replicate.delivery/mgxm/e5bf7b39-c12c-4577-ab01-84abbcbec294/output.png", "started_at": "2022-08-02T04:54:41.849726Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/tx33twhdobd53lb7zrukqhc2jy", "cancel": "https://api.replicate.com/v1/predictions/tx33twhdobd53lb7zrukqhc2jy/cancel" }, "version": "ee98cd06c1febf78a7d5a7888fd1cf134f22a14e795efe3b6e14e8f2dac3df46" }
Generated inPrediction
jarrentwu1031/ccpl:ee98cd06c1febf78a7d5a7888fd1cf134f22a14e795efe3b6e14e8f2dac3df46IDcxexpqjttfhtflb5aulavhmsyyStatusSucceededSourceWebHardware–Total durationCreatedInput
{ "mode": "art", "style": "https://replicate.delivery/mgxm/fa2951de-0e0c-4c62-affd-a50334126bba/6.jpg", "content": "https://replicate.delivery/mgxm/1d0eb9b8-0229-477e-a436-edfa25a21d07/newyork.jpg", "style_size": 0, "content_size": 0 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run jarrentwu1031/ccpl using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "jarrentwu1031/ccpl:ee98cd06c1febf78a7d5a7888fd1cf134f22a14e795efe3b6e14e8f2dac3df46", { input: { mode: "art", style: "https://replicate.delivery/mgxm/fa2951de-0e0c-4c62-affd-a50334126bba/6.jpg", content: "https://replicate.delivery/mgxm/1d0eb9b8-0229-477e-a436-edfa25a21d07/newyork.jpg", style_size: 0, content_size: 0 } } ); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run jarrentwu1031/ccpl using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "jarrentwu1031/ccpl:ee98cd06c1febf78a7d5a7888fd1cf134f22a14e795efe3b6e14e8f2dac3df46", input={ "mode": "art", "style": "https://replicate.delivery/mgxm/fa2951de-0e0c-4c62-affd-a50334126bba/6.jpg", "content": "https://replicate.delivery/mgxm/1d0eb9b8-0229-477e-a436-edfa25a21d07/newyork.jpg", "style_size": 0, "content_size": 0 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run jarrentwu1031/ccpl 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": "jarrentwu1031/ccpl:ee98cd06c1febf78a7d5a7888fd1cf134f22a14e795efe3b6e14e8f2dac3df46", "input": { "mode": "art", "style": "https://replicate.delivery/mgxm/fa2951de-0e0c-4c62-affd-a50334126bba/6.jpg", "content": "https://replicate.delivery/mgxm/1d0eb9b8-0229-477e-a436-edfa25a21d07/newyork.jpg", "style_size": 0, "content_size": 0 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
You can run this model locally using Cog. First, install Cog: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/jarrentwu1031/ccpl@sha256:ee98cd06c1febf78a7d5a7888fd1cf134f22a14e795efe3b6e14e8f2dac3df46 \ -i 'mode="art"' \ -i 'style="https://replicate.delivery/mgxm/fa2951de-0e0c-4c62-affd-a50334126bba/6.jpg"' \ -i 'content="https://replicate.delivery/mgxm/1d0eb9b8-0229-477e-a436-edfa25a21d07/newyork.jpg"' \ -i 'style_size=0' \ -i 'content_size=0'
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/jarrentwu1031/ccpl@sha256:ee98cd06c1febf78a7d5a7888fd1cf134f22a14e795efe3b6e14e8f2dac3df46
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "mode": "art", "style": "https://replicate.delivery/mgxm/fa2951de-0e0c-4c62-affd-a50334126bba/6.jpg", "content": "https://replicate.delivery/mgxm/1d0eb9b8-0229-477e-a436-edfa25a21d07/newyork.jpg", "style_size": 0, "content_size": 0 } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Output
{ "completed_at": "2022-08-02T04:59:23.204309Z", "created_at": "2022-08-02T04:59:20.766177Z", "data_removed": false, "error": null, "id": "cxexpqjttfhtflb5aulavhmsyy", "input": { "mode": "art", "style": "https://replicate.delivery/mgxm/fa2951de-0e0c-4c62-affd-a50334126bba/6.jpg", "content": "https://replicate.delivery/mgxm/1d0eb9b8-0229-477e-a436-edfa25a21d07/newyork.jpg", "style_size": 0, "content_size": 0 }, "logs": null, "metrics": { "predict_time": 2.256669, "total_time": 2.438132 }, "output": "https://replicate.delivery/mgxm/b22bb5fd-856d-4c5d-9245-42e610268ff1/output.png", "started_at": "2022-08-02T04:59:20.947640Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/cxexpqjttfhtflb5aulavhmsyy", "cancel": "https://api.replicate.com/v1/predictions/cxexpqjttfhtflb5aulavhmsyy/cancel" }, "version": "ee98cd06c1febf78a7d5a7888fd1cf134f22a14e795efe3b6e14e8f2dac3df46" }
Generated inPrediction
jarrentwu1031/ccpl:ee98cd06c1febf78a7d5a7888fd1cf134f22a14e795efe3b6e14e8f2dac3df46IDgacgil6bsjhsplp4q4hnqwuvsqStatusSucceededSourceWebHardware–Total durationCreatedInput
{ "mode": "art", "style": "https://replicate.delivery/mgxm/73a38fc6-0713-4bb9-a2a4-e464bdd35c64/15.jpg", "content": "https://replicate.delivery/mgxm/96745438-6ed1-4231-b3c3-46b85937b062/1.jpg", "style_size": 0, "content_size": 0 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run jarrentwu1031/ccpl using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "jarrentwu1031/ccpl:ee98cd06c1febf78a7d5a7888fd1cf134f22a14e795efe3b6e14e8f2dac3df46", { input: { mode: "art", style: "https://replicate.delivery/mgxm/73a38fc6-0713-4bb9-a2a4-e464bdd35c64/15.jpg", content: "https://replicate.delivery/mgxm/96745438-6ed1-4231-b3c3-46b85937b062/1.jpg", style_size: 0, content_size: 0 } } ); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run jarrentwu1031/ccpl using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "jarrentwu1031/ccpl:ee98cd06c1febf78a7d5a7888fd1cf134f22a14e795efe3b6e14e8f2dac3df46", input={ "mode": "art", "style": "https://replicate.delivery/mgxm/73a38fc6-0713-4bb9-a2a4-e464bdd35c64/15.jpg", "content": "https://replicate.delivery/mgxm/96745438-6ed1-4231-b3c3-46b85937b062/1.jpg", "style_size": 0, "content_size": 0 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run jarrentwu1031/ccpl 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": "jarrentwu1031/ccpl:ee98cd06c1febf78a7d5a7888fd1cf134f22a14e795efe3b6e14e8f2dac3df46", "input": { "mode": "art", "style": "https://replicate.delivery/mgxm/73a38fc6-0713-4bb9-a2a4-e464bdd35c64/15.jpg", "content": "https://replicate.delivery/mgxm/96745438-6ed1-4231-b3c3-46b85937b062/1.jpg", "style_size": 0, "content_size": 0 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
You can run this model locally using Cog. First, install Cog: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/jarrentwu1031/ccpl@sha256:ee98cd06c1febf78a7d5a7888fd1cf134f22a14e795efe3b6e14e8f2dac3df46 \ -i 'mode="art"' \ -i 'style="https://replicate.delivery/mgxm/73a38fc6-0713-4bb9-a2a4-e464bdd35c64/15.jpg"' \ -i 'content="https://replicate.delivery/mgxm/96745438-6ed1-4231-b3c3-46b85937b062/1.jpg"' \ -i 'style_size=0' \ -i 'content_size=0'
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/jarrentwu1031/ccpl@sha256:ee98cd06c1febf78a7d5a7888fd1cf134f22a14e795efe3b6e14e8f2dac3df46
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "mode": "art", "style": "https://replicate.delivery/mgxm/73a38fc6-0713-4bb9-a2a4-e464bdd35c64/15.jpg", "content": "https://replicate.delivery/mgxm/96745438-6ed1-4231-b3c3-46b85937b062/1.jpg", "style_size": 0, "content_size": 0 } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Output
{ "completed_at": "2022-08-02T04:57:14.450791Z", "created_at": "2022-08-02T04:57:11.761982Z", "data_removed": false, "error": null, "id": "gacgil6bsjhsplp4q4hnqwuvsq", "input": { "mode": "art", "style": "https://replicate.delivery/mgxm/73a38fc6-0713-4bb9-a2a4-e464bdd35c64/15.jpg", "content": "https://replicate.delivery/mgxm/96745438-6ed1-4231-b3c3-46b85937b062/1.jpg", "style_size": 0, "content_size": 0 }, "logs": null, "metrics": { "predict_time": 2.494353, "total_time": 2.688809 }, "output": "https://replicate.delivery/mgxm/4743e304-ae1b-4369-a838-a73787d4c73a/output.png", "started_at": "2022-08-02T04:57:11.956438Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/gacgil6bsjhsplp4q4hnqwuvsq", "cancel": "https://api.replicate.com/v1/predictions/gacgil6bsjhsplp4q4hnqwuvsq/cancel" }, "version": "ee98cd06c1febf78a7d5a7888fd1cf134f22a14e795efe3b6e14e8f2dac3df46" }
Generated inPrediction
jarrentwu1031/ccpl:ee98cd06c1febf78a7d5a7888fd1cf134f22a14e795efe3b6e14e8f2dac3df46IDvo5xetcqzvdodlexvyn4xk43tiStatusSucceededSourceWebHardware–Total durationCreatedInput
{ "mode": "photo-realistic", "style": "https://replicate.delivery/mgxm/7d979987-1db5-4bbc-9f16-0a550f0511ec/in2.png", "content": "https://replicate.delivery/mgxm/b343aa02-9662-42b4-bd4e-75b3de545404/1.png", "style_size": 256, "content_size": 1024 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run jarrentwu1031/ccpl using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "jarrentwu1031/ccpl:ee98cd06c1febf78a7d5a7888fd1cf134f22a14e795efe3b6e14e8f2dac3df46", { input: { mode: "photo-realistic", style: "https://replicate.delivery/mgxm/7d979987-1db5-4bbc-9f16-0a550f0511ec/in2.png", content: "https://replicate.delivery/mgxm/b343aa02-9662-42b4-bd4e-75b3de545404/1.png", style_size: 256, content_size: 1024 } } ); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run jarrentwu1031/ccpl using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "jarrentwu1031/ccpl:ee98cd06c1febf78a7d5a7888fd1cf134f22a14e795efe3b6e14e8f2dac3df46", input={ "mode": "photo-realistic", "style": "https://replicate.delivery/mgxm/7d979987-1db5-4bbc-9f16-0a550f0511ec/in2.png", "content": "https://replicate.delivery/mgxm/b343aa02-9662-42b4-bd4e-75b3de545404/1.png", "style_size": 256, "content_size": 1024 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run jarrentwu1031/ccpl 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": "jarrentwu1031/ccpl:ee98cd06c1febf78a7d5a7888fd1cf134f22a14e795efe3b6e14e8f2dac3df46", "input": { "mode": "photo-realistic", "style": "https://replicate.delivery/mgxm/7d979987-1db5-4bbc-9f16-0a550f0511ec/in2.png", "content": "https://replicate.delivery/mgxm/b343aa02-9662-42b4-bd4e-75b3de545404/1.png", "style_size": 256, "content_size": 1024 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
You can run this model locally using Cog. First, install Cog: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/jarrentwu1031/ccpl@sha256:ee98cd06c1febf78a7d5a7888fd1cf134f22a14e795efe3b6e14e8f2dac3df46 \ -i 'mode="photo-realistic"' \ -i 'style="https://replicate.delivery/mgxm/7d979987-1db5-4bbc-9f16-0a550f0511ec/in2.png"' \ -i 'content="https://replicate.delivery/mgxm/b343aa02-9662-42b4-bd4e-75b3de545404/1.png"' \ -i 'style_size=256' \ -i 'content_size=1024'
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/jarrentwu1031/ccpl@sha256:ee98cd06c1febf78a7d5a7888fd1cf134f22a14e795efe3b6e14e8f2dac3df46
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "mode": "photo-realistic", "style": "https://replicate.delivery/mgxm/7d979987-1db5-4bbc-9f16-0a550f0511ec/in2.png", "content": "https://replicate.delivery/mgxm/b343aa02-9662-42b4-bd4e-75b3de545404/1.png", "style_size": 256, "content_size": 1024 } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Output
{ "completed_at": "2022-08-02T05:02:06.084594Z", "created_at": "2022-08-02T05:02:04.184702Z", "data_removed": false, "error": null, "id": "vo5xetcqzvdodlexvyn4xk43ti", "input": { "mode": "photo-realistic", "style": "https://replicate.delivery/mgxm/7d979987-1db5-4bbc-9f16-0a550f0511ec/in2.png", "content": "https://replicate.delivery/mgxm/b343aa02-9662-42b4-bd4e-75b3de545404/1.png", "style_size": 256, "content_size": 1024 }, "logs": null, "metrics": { "predict_time": 1.74476, "total_time": 1.899892 }, "output": "https://replicate.delivery/mgxm/2a4c0ba8-f7ba-497f-a049-3912f02307f0/output.png", "started_at": "2022-08-02T05:02:04.339834Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/vo5xetcqzvdodlexvyn4xk43ti", "cancel": "https://api.replicate.com/v1/predictions/vo5xetcqzvdodlexvyn4xk43ti/cancel" }, "version": "ee98cd06c1febf78a7d5a7888fd1cf134f22a14e795efe3b6e14e8f2dac3df46" }
Generated in
Want to make some of these yourself?
Run this model