fater-ai / pixel-hacker
- Public
- 1 run
Run fater-ai/pixel-hacker 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 |
---|---|---|---|
image |
string
|
Input image for inpainting.
|
|
mask |
string
|
Mask image (white pixels indicate regions to inpaint, black pixels are known).
|
|
model_version |
string
(enum)
|
ft_places2
Options: ft_places2, ft_celebahq, ft_ffhq, pretrained |
PixelHacker model version to use.
|
image_size |
integer
|
512
|
Resize short edge of the image to this size for processing. Output matches original size.
|
mask_dilate_kernel_size |
integer
|
0
|
Kernel size for mask dilation. 0 means no dilation.
|
mask_preprocess_type |
string
(enum)
|
dilate
Options: dilate, morphologyEx |
Mask preprocessing type.
|
num_steps |
integer
|
20
Min: 1 Max: 200 |
Number of denoising steps.
|
guidance_scale |
number
|
4.5
Min: 1 Max: 20 |
Classifier-Free Guidance scale. Higher values adhere more to guidance.
|
strength |
number
|
0.999
Max: 1 |
Controls how much noise is added to the initial image, affecting how much the image is altered. 1.0 means full noise. (Used to determine inference timesteps).
|
paste_composite |
boolean
|
True
|
If true, composites the inpainted region back into the original image context using the mask. Otherwise, returns the full inpainted image.
|
compensate_color |
boolean
|
True
|
If true (and paste_composite is true), applies color compensation during compositing.
|
{
"type": "object",
"title": "Input",
"required": [
"image",
"mask"
],
"properties": {
"mask": {
"type": "string",
"title": "Mask",
"format": "uri",
"x-order": 1,
"description": "Mask image (white pixels indicate regions to inpaint, black pixels are known)."
},
"image": {
"type": "string",
"title": "Image",
"format": "uri",
"x-order": 0,
"description": "Input image for inpainting."
},
"strength": {
"type": "number",
"title": "Strength",
"default": 0.999,
"maximum": 1,
"minimum": 0,
"x-order": 8,
"description": "Controls how much noise is added to the initial image, affecting how much the image is altered. 1.0 means full noise. (Used to determine inference timesteps)."
},
"num_steps": {
"type": "integer",
"title": "Num Steps",
"default": 20,
"maximum": 200,
"minimum": 1,
"x-order": 6,
"description": "Number of denoising steps."
},
"image_size": {
"type": "integer",
"title": "Image Size",
"default": 512,
"x-order": 3,
"description": "Resize short edge of the image to this size for processing. Output matches original size."
},
"model_version": {
"enum": [
"ft_places2",
"ft_celebahq",
"ft_ffhq",
"pretrained"
],
"type": "string",
"title": "model_version",
"description": "PixelHacker model version to use.",
"default": "ft_places2",
"x-order": 2
},
"guidance_scale": {
"type": "number",
"title": "Guidance Scale",
"default": 4.5,
"maximum": 20,
"minimum": 1,
"x-order": 7,
"description": "Classifier-Free Guidance scale. Higher values adhere more to guidance."
},
"paste_composite": {
"type": "boolean",
"title": "Paste Composite",
"default": true,
"x-order": 9,
"description": "If true, composites the inpainted region back into the original image context using the mask. Otherwise, returns the full inpainted image."
},
"compensate_color": {
"type": "boolean",
"title": "Compensate Color",
"default": true,
"x-order": 10,
"description": "If true (and paste_composite is true), applies color compensation during compositing."
},
"mask_preprocess_type": {
"enum": [
"dilate",
"morphologyEx"
],
"type": "string",
"title": "mask_preprocess_type",
"description": "Mask preprocessing type.",
"default": "dilate",
"x-order": 5
},
"mask_dilate_kernel_size": {
"type": "integer",
"title": "Mask Dilate Kernel Size",
"default": 0,
"minimum": 0,
"x-order": 4,
"description": "Kernel size for mask dilation. 0 means no dilation."
}
}
}
Output schema
The shape of the response you’ll get when you run this model with an API.
{
"type": "array",
"items": {
"type": "string",
"format": "uri"
},
"title": "Output"
}