sczhou
/
codeformer
Robust face restoration algorithm for old photos / AI-generated faces
Prediction
sczhou/codeformer:7de2ea26c616d5bf2245ad0d5e24f0ff9a6204578a5c876db53142edd9d2cd56Input
{ "image": "https://replicate.delivery/mgxm/9ff2825b-ad72-4aca-bf0a-a2cdf61f8068/1.png", "upscale": 2, "face_upsample": true, "background_enhance": true, "codeformer_fidelity": "0.2" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run sczhou/codeformer using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "sczhou/codeformer:7de2ea26c616d5bf2245ad0d5e24f0ff9a6204578a5c876db53142edd9d2cd56", { input: { image: "https://replicate.delivery/mgxm/9ff2825b-ad72-4aca-bf0a-a2cdf61f8068/1.png", upscale: 2, face_upsample: true, background_enhance: true, codeformer_fidelity: "0.2" } } ); // 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 sczhou/codeformer using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "sczhou/codeformer:7de2ea26c616d5bf2245ad0d5e24f0ff9a6204578a5c876db53142edd9d2cd56", input={ "image": "https://replicate.delivery/mgxm/9ff2825b-ad72-4aca-bf0a-a2cdf61f8068/1.png", "upscale": 2, "face_upsample": True, "background_enhance": True, "codeformer_fidelity": "0.2" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run sczhou/codeformer 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": "7de2ea26c616d5bf2245ad0d5e24f0ff9a6204578a5c876db53142edd9d2cd56", "input": { "image": "https://replicate.delivery/mgxm/9ff2825b-ad72-4aca-bf0a-a2cdf61f8068/1.png", "upscale": 2, "face_upsample": true, "background_enhance": true, "codeformer_fidelity": "0.2" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
Loading...
{ "completed_at": "2022-09-11T07:49:19.171466Z", "created_at": "2022-09-11T07:47:47.444236Z", "data_removed": false, "error": null, "id": "3brtklnlxrh5dai63qnopzlwde", "input": { "image": "https://replicate.delivery/mgxm/9ff2825b-ad72-4aca-bf0a-a2cdf61f8068/1.png", "upscale": 2, "face_upsample": true, "background_enhance": true, "codeformer_fidelity": "0.2" }, "logs": "\tdetect 2 faces", "metrics": { "predict_time": 5.567838, "total_time": 91.72723 }, "output": "https://replicate.delivery/mgxm/3d919864-699f-41eb-9202-67eae3cab055/output.png", "started_at": "2022-09-11T07:49:13.603628Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/3brtklnlxrh5dai63qnopzlwde", "cancel": "https://api.replicate.com/v1/predictions/3brtklnlxrh5dai63qnopzlwde/cancel" }, "version": "7de2ea26c616d5bf2245ad0d5e24f0ff9a6204578a5c876db53142edd9d2cd56" }
Generated indetect 2 faces
Prediction
sczhou/codeformer:7de2ea26c616d5bf2245ad0d5e24f0ff9a6204578a5c876db53142edd9d2cd56Input
{ "image": "https://replicate.delivery/mgxm/a1daba8e-af14-4b00-86a4-69cec9619b53/04.jpg", "upscale": 2, "face_upsample": true, "background_enhance": true, "codeformer_fidelity": "0.8" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run sczhou/codeformer using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "sczhou/codeformer:7de2ea26c616d5bf2245ad0d5e24f0ff9a6204578a5c876db53142edd9d2cd56", { input: { image: "https://replicate.delivery/mgxm/a1daba8e-af14-4b00-86a4-69cec9619b53/04.jpg", upscale: 2, face_upsample: true, background_enhance: true, codeformer_fidelity: "0.8" } } ); // 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 sczhou/codeformer using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "sczhou/codeformer:7de2ea26c616d5bf2245ad0d5e24f0ff9a6204578a5c876db53142edd9d2cd56", input={ "image": "https://replicate.delivery/mgxm/a1daba8e-af14-4b00-86a4-69cec9619b53/04.jpg", "upscale": 2, "face_upsample": True, "background_enhance": True, "codeformer_fidelity": "0.8" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run sczhou/codeformer 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": "7de2ea26c616d5bf2245ad0d5e24f0ff9a6204578a5c876db53142edd9d2cd56", "input": { "image": "https://replicate.delivery/mgxm/a1daba8e-af14-4b00-86a4-69cec9619b53/04.jpg", "upscale": 2, "face_upsample": true, "background_enhance": true, "codeformer_fidelity": "0.8" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
Loading...
{ "completed_at": "2022-09-11T07:53:33.806762Z", "created_at": "2022-09-11T07:52:01.981758Z", "data_removed": false, "error": null, "id": "jlvo5tu4szhqdm4ixnzxtmk5oa", "input": { "image": "https://replicate.delivery/mgxm/a1daba8e-af14-4b00-86a4-69cec9619b53/04.jpg", "upscale": 2, "face_upsample": true, "background_enhance": true, "codeformer_fidelity": "0.8" }, "logs": "\tdetect 1 faces", "metrics": { "predict_time": 4.465995, "total_time": 91.825004 }, "output": "https://replicate.delivery/mgxm/4e7adcc7-eb0d-49c9-81e5-56c041f7a9dd/output.png", "started_at": "2022-09-11T07:53:29.340767Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/jlvo5tu4szhqdm4ixnzxtmk5oa", "cancel": "https://api.replicate.com/v1/predictions/jlvo5tu4szhqdm4ixnzxtmk5oa/cancel" }, "version": "7de2ea26c616d5bf2245ad0d5e24f0ff9a6204578a5c876db53142edd9d2cd56" }
Generated indetect 1 faces
Prediction
sczhou/codeformer:7de2ea26c616d5bf2245ad0d5e24f0ff9a6204578a5c876db53142edd9d2cd56Input
{ "image": "https://replicate.delivery/mgxm/7534e8f1-ee01-4d66-ae40-36343e5eb44a/003.png", "upscale": 2, "face_upsample": true, "background_enhance": true, "codeformer_fidelity": "0.1" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run sczhou/codeformer using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "sczhou/codeformer:7de2ea26c616d5bf2245ad0d5e24f0ff9a6204578a5c876db53142edd9d2cd56", { input: { image: "https://replicate.delivery/mgxm/7534e8f1-ee01-4d66-ae40-36343e5eb44a/003.png", upscale: 2, face_upsample: true, background_enhance: true, codeformer_fidelity: "0.1" } } ); // 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 sczhou/codeformer using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "sczhou/codeformer:7de2ea26c616d5bf2245ad0d5e24f0ff9a6204578a5c876db53142edd9d2cd56", input={ "image": "https://replicate.delivery/mgxm/7534e8f1-ee01-4d66-ae40-36343e5eb44a/003.png", "upscale": 2, "face_upsample": True, "background_enhance": True, "codeformer_fidelity": "0.1" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run sczhou/codeformer 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": "7de2ea26c616d5bf2245ad0d5e24f0ff9a6204578a5c876db53142edd9d2cd56", "input": { "image": "https://replicate.delivery/mgxm/7534e8f1-ee01-4d66-ae40-36343e5eb44a/003.png", "upscale": 2, "face_upsample": true, "background_enhance": true, "codeformer_fidelity": "0.1" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
Loading...
{ "completed_at": "2022-09-11T12:40:15.818611Z", "created_at": "2022-09-11T12:40:11.711323Z", "data_removed": false, "error": null, "id": "o2bjwswd6bfmfpcemfhl26j5we", "input": { "image": "https://replicate.delivery/mgxm/7534e8f1-ee01-4d66-ae40-36343e5eb44a/003.png", "upscale": 2, "face_upsample": true, "background_enhance": true, "codeformer_fidelity": "0.1" }, "logs": "\tdetect 1 faces", "metrics": { "predict_time": 2.874068, "total_time": 4.107288 }, "output": "https://replicate.delivery/mgxm/c855fbf8-8a34-4373-93ca-bafa0c6fb70c/output.png", "started_at": "2022-09-11T12:40:12.944543Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/o2bjwswd6bfmfpcemfhl26j5we", "cancel": "https://api.replicate.com/v1/predictions/o2bjwswd6bfmfpcemfhl26j5we/cancel" }, "version": "7de2ea26c616d5bf2245ad0d5e24f0ff9a6204578a5c876db53142edd9d2cd56" }
Generated indetect 1 faces
Prediction
sczhou/codeformer:7de2ea26c616d5bf2245ad0d5e24f0ff9a6204578a5c876db53142edd9d2cd56Input
{ "image": "https://replicate.delivery/mgxm/542d64f9-1712-4de7-85f7-3863009a7c3d/03.jpg", "upscale": 2, "face_upsample": true, "background_enhance": true, "codeformer_fidelity": "0.8" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run sczhou/codeformer using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "sczhou/codeformer:7de2ea26c616d5bf2245ad0d5e24f0ff9a6204578a5c876db53142edd9d2cd56", { input: { image: "https://replicate.delivery/mgxm/542d64f9-1712-4de7-85f7-3863009a7c3d/03.jpg", upscale: 2, face_upsample: true, background_enhance: true, codeformer_fidelity: "0.8" } } ); // 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 sczhou/codeformer using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "sczhou/codeformer:7de2ea26c616d5bf2245ad0d5e24f0ff9a6204578a5c876db53142edd9d2cd56", input={ "image": "https://replicate.delivery/mgxm/542d64f9-1712-4de7-85f7-3863009a7c3d/03.jpg", "upscale": 2, "face_upsample": True, "background_enhance": True, "codeformer_fidelity": "0.8" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run sczhou/codeformer 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": "7de2ea26c616d5bf2245ad0d5e24f0ff9a6204578a5c876db53142edd9d2cd56", "input": { "image": "https://replicate.delivery/mgxm/542d64f9-1712-4de7-85f7-3863009a7c3d/03.jpg", "upscale": 2, "face_upsample": true, "background_enhance": true, "codeformer_fidelity": "0.8" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
Loading...
{ "completed_at": "2022-09-11T12:43:10.653808Z", "created_at": "2022-09-11T12:43:06.921886Z", "data_removed": false, "error": null, "id": "4fm5bdzc2bffdkdddnel32wbfq", "input": { "image": "https://replicate.delivery/mgxm/542d64f9-1712-4de7-85f7-3863009a7c3d/03.jpg", "upscale": 2, "face_upsample": true, "background_enhance": true, "codeformer_fidelity": "0.8" }, "logs": "\tdetect 1 faces", "metrics": { "predict_time": 2.157467, "total_time": 3.731922 }, "output": "https://replicate.delivery/mgxm/65f7c22b-c353-47c0-8d2e-733fbcb0f436/output.png", "started_at": "2022-09-11T12:43:08.496341Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/4fm5bdzc2bffdkdddnel32wbfq", "cancel": "https://api.replicate.com/v1/predictions/4fm5bdzc2bffdkdddnel32wbfq/cancel" }, "version": "7de2ea26c616d5bf2245ad0d5e24f0ff9a6204578a5c876db53142edd9d2cd56" }
Generated indetect 1 faces
Prediction
sczhou/codeformer:7de2ea26c616d5bf2245ad0d5e24f0ff9a6204578a5c876db53142edd9d2cd56Input
{ "image": "https://replicate.delivery/mgxm/a11098b0-a18a-4c02-a19a-9a7045d68426/010.jpg", "upscale": 2, "face_upsample": true, "background_enhance": true, "codeformer_fidelity": "0.1" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run sczhou/codeformer using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "sczhou/codeformer:7de2ea26c616d5bf2245ad0d5e24f0ff9a6204578a5c876db53142edd9d2cd56", { input: { image: "https://replicate.delivery/mgxm/a11098b0-a18a-4c02-a19a-9a7045d68426/010.jpg", upscale: 2, face_upsample: true, background_enhance: true, codeformer_fidelity: "0.1" } } ); // 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 sczhou/codeformer using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "sczhou/codeformer:7de2ea26c616d5bf2245ad0d5e24f0ff9a6204578a5c876db53142edd9d2cd56", input={ "image": "https://replicate.delivery/mgxm/a11098b0-a18a-4c02-a19a-9a7045d68426/010.jpg", "upscale": 2, "face_upsample": True, "background_enhance": True, "codeformer_fidelity": "0.1" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run sczhou/codeformer 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": "7de2ea26c616d5bf2245ad0d5e24f0ff9a6204578a5c876db53142edd9d2cd56", "input": { "image": "https://replicate.delivery/mgxm/a11098b0-a18a-4c02-a19a-9a7045d68426/010.jpg", "upscale": 2, "face_upsample": true, "background_enhance": true, "codeformer_fidelity": "0.1" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
Loading...
{ "completed_at": "2022-09-12T05:01:21.429276Z", "created_at": "2022-09-12T05:00:26.359445Z", "data_removed": false, "error": null, "id": "tlm3wkg3aveyvjzmv6es65dy5m", "input": { "image": "https://replicate.delivery/mgxm/a11098b0-a18a-4c02-a19a-9a7045d68426/010.jpg", "upscale": 2, "face_upsample": true, "background_enhance": true, "codeformer_fidelity": "0.1" }, "logs": "\tdetect 1 faces", "metrics": { "predict_time": 21.283789, "total_time": 55.069831 }, "output": "https://replicate.delivery/mgxm/5c63e499-7f07-49d7-abfe-4af11015713e/output.png", "started_at": "2022-09-12T05:01:00.145487Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/tlm3wkg3aveyvjzmv6es65dy5m", "cancel": "https://api.replicate.com/v1/predictions/tlm3wkg3aveyvjzmv6es65dy5m/cancel" }, "version": "7de2ea26c616d5bf2245ad0d5e24f0ff9a6204578a5c876db53142edd9d2cd56" }
Generated indetect 1 faces
Prediction
sczhou/codeformer:7de2ea26c616d5bf2245ad0d5e24f0ff9a6204578a5c876db53142edd9d2cd56Input
{ "image": "https://replicate.delivery/mgxm/7cf19c2c-e0cf-4712-9af8-cf5bdbb8d0ee/012.jpg", "upscale": 2, "face_upsample": true, "background_enhance": true, "codeformer_fidelity": "0.1" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run sczhou/codeformer using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "sczhou/codeformer:7de2ea26c616d5bf2245ad0d5e24f0ff9a6204578a5c876db53142edd9d2cd56", { input: { image: "https://replicate.delivery/mgxm/7cf19c2c-e0cf-4712-9af8-cf5bdbb8d0ee/012.jpg", upscale: 2, face_upsample: true, background_enhance: true, codeformer_fidelity: "0.1" } } ); // 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 sczhou/codeformer using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "sczhou/codeformer:7de2ea26c616d5bf2245ad0d5e24f0ff9a6204578a5c876db53142edd9d2cd56", input={ "image": "https://replicate.delivery/mgxm/7cf19c2c-e0cf-4712-9af8-cf5bdbb8d0ee/012.jpg", "upscale": 2, "face_upsample": True, "background_enhance": True, "codeformer_fidelity": "0.1" } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Run sczhou/codeformer 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": "7de2ea26c616d5bf2245ad0d5e24f0ff9a6204578a5c876db53142edd9d2cd56", "input": { "image": "https://replicate.delivery/mgxm/7cf19c2c-e0cf-4712-9af8-cf5bdbb8d0ee/012.jpg", "upscale": 2, "face_upsample": true, "background_enhance": true, "codeformer_fidelity": "0.1" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
Loading...
{ "completed_at": "2022-09-12T05:07:27.736244Z", "created_at": "2022-09-12T05:07:05.954300Z", "data_removed": false, "error": null, "id": "bahjhnqssfhttn645cdifzawge", "input": { "image": "https://replicate.delivery/mgxm/7cf19c2c-e0cf-4712-9af8-cf5bdbb8d0ee/012.jpg", "upscale": 2, "face_upsample": true, "background_enhance": true, "codeformer_fidelity": "0.1" }, "logs": "\tdetect 1 faces", "metrics": { "predict_time": 7.452058, "total_time": 21.781944 }, "output": "https://replicate.delivery/mgxm/b8fd7cea-aba2-4793-8d85-dc2cbeea9085/output.png", "started_at": "2022-09-12T05:07:20.284186Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/bahjhnqssfhttn645cdifzawge", "cancel": "https://api.replicate.com/v1/predictions/bahjhnqssfhttn645cdifzawge/cancel" }, "version": "7de2ea26c616d5bf2245ad0d5e24f0ff9a6204578a5c876db53142edd9d2cd56" }
Generated indetect 1 faces
Want to make some of these yourself?
Run this model