catacolabs/codeformer
Robust face restoration algorithm for old photos
Run catacolabs/codeformer with an API
Use one of our client libraries to get started quickly. Clicking on a library will take you to the Playground tab where you can tweak different inputs, see the results, and copy the corresponding code to use in your own project.
Input schema
The fields you can use to run this model with an API. If you don't give a value for a field its default value will be used.
| Field | Type | Default value | Description |
|---|---|---|---|
| images |
array
|
Input image(s) - up to 4 images
|
|
| codeformer_fidelity |
number
|
0.5
Max: 1 |
Balance the quality (lower number) and fidelity (higher number).
|
| runtime_profile |
None
|
baseline
|
Runtime profile
|
| stability_mode |
None
|
safe
|
Execution mode: safe for maximum reliability on Replicate, optimized for maximum speed
|
| compile_backend |
None
|
eager
|
torch.compile backend used only when stability_mode=optimized
|
{
"type": "object",
"title": "Input",
"required": [
"images"
],
"properties": {
"images": {
"type": "array",
"items": {
"type": "string",
"format": "uri"
},
"title": "Images",
"x-order": 0,
"description": "Input image(s) - up to 4 images"
},
"stability_mode": {
"enum": [
"safe",
"optimized"
],
"type": "string",
"title": "stability_mode",
"description": "Execution mode: safe for maximum reliability on Replicate, optimized for maximum speed",
"default": "safe",
"x-order": 3
},
"compile_backend": {
"enum": [
"none",
"eager",
"aot_eager",
"inductor"
],
"type": "string",
"title": "compile_backend",
"description": "torch.compile backend used only when stability_mode=optimized",
"default": "eager",
"x-order": 4
},
"runtime_profile": {
"enum": [
"baseline",
"fast",
"max_speed"
],
"type": "string",
"title": "runtime_profile",
"description": "Runtime profile",
"default": "baseline",
"x-order": 2
},
"codeformer_fidelity": {
"type": "number",
"title": "Codeformer Fidelity",
"default": 0.5,
"maximum": 1,
"minimum": 0,
"x-order": 1,
"description": "Balance the quality (lower number) and fidelity (higher number)."
}
}
}
Output schema
The shape of the response you’ll get when you run this model with an API.
Schema
{
"type": "array",
"items": {
"type": "string",
"format": "uri"
},
"title": "Output"
}