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.
sczhou /codeformer:cc4956dd
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 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:cc4956dd26fa5a7185d5660cc9100fab1b8070a1d1654a8bb5eb6d443b020bb2",
{
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
}
}
);
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 sczhou/codeformer using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"sczhou/codeformer:cc4956dd26fa5a7185d5660cc9100fab1b8070a1d1654a8bb5eb6d443b020bb2",
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.
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
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": "cc4956dd26fa5a7185d5660cc9100fab1b8070a1d1654a8bb5eb6d443b020bb2",
"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.
Add a payment method to run this model.
By signing in, you agree to our
terms of service and privacy policy
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"
}
detect 1 faces
This example was created by a different version, sczhou/codeformer:7de2ea26.