f9e42d/5o63nf
Run f9e42d/5o63nf 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
|
|
| prompt |
string
|
Text prompt for inpainting
|
|
| strength |
number
|
0.85
Max: 1 |
Strength of inpainting. Higher values allow for more deviation from the original image.
|
| num_inference_steps |
integer
|
30
Min: 1 Max: 50 |
Number of denoising steps. More steps usually lead to a higher quality image at the expense of slower inference.
|
| guidance_scale |
number
|
7
Min: 1 Max: 20 |
Guidance scale as defined in Classifier-Free Diffusion Guidance. Higher guidance scale encourages images that are closely linked to the text prompt, usually at the expense of lower image quality.
|
| height |
integer
|
1024
Min: 128 Max: 2048 |
Height of the output image. Will be rounded to the nearest multiple of 8.
|
| width |
integer
|
1024
Min: 128 Max: 2048 |
Width of the output image. Will be rounded to the nearest multiple of 8.
|
| num_outputs |
integer
|
1
Min: 1 Max: 8 |
Number of images to generate per prompt. Batch size is set to 1
|
| seed |
integer
|
Random seed. Leave blank to randomize the seed
|
|
| output_format |
None
|
webp
|
Format of the output image
|
| output_quality |
integer
|
80
Max: 100 |
Quality of the output image, from 0 to 100. 100 is best quality, 0 is lowest quality.
|
| n_pixels_extension |
integer
|
0
|
Number of pixels to extend the mask by. Higher values will lead to smoother edges.
|
{
"type": "object",
"title": "Input",
"required": [
"image",
"prompt"
],
"properties": {
"mask": {
"type": "string",
"title": "Mask",
"format": "uri",
"x-order": 1,
"nullable": true,
"description": "Mask image"
},
"seed": {
"type": "integer",
"title": "Seed",
"x-order": 9,
"description": "Random seed. Leave blank to randomize the seed"
},
"image": {
"type": "string",
"title": "Image",
"format": "uri",
"x-order": 0,
"description": "Input image for inpainting"
},
"width": {
"type": "integer",
"title": "Width",
"default": 1024,
"maximum": 2048,
"minimum": 128,
"x-order": 7,
"description": "Width of the output image. Will be rounded to the nearest multiple of 8."
},
"height": {
"type": "integer",
"title": "Height",
"default": 1024,
"maximum": 2048,
"minimum": 128,
"x-order": 6,
"description": "Height of the output image. Will be rounded to the nearest multiple of 8."
},
"prompt": {
"type": "string",
"title": "Prompt",
"x-order": 2,
"description": "Text prompt for inpainting"
},
"strength": {
"type": "number",
"title": "Strength",
"default": 0.85,
"maximum": 1,
"minimum": 0,
"x-order": 3,
"description": "Strength of inpainting. Higher values allow for more deviation from the original image."
},
"num_outputs": {
"type": "integer",
"title": "Num Outputs",
"default": 1,
"maximum": 8,
"minimum": 1,
"x-order": 8,
"description": "Number of images to generate per prompt. Batch size is set to 1"
},
"output_format": {
"enum": [
"webp",
"jpg",
"png"
],
"type": "string",
"title": "output_format",
"description": "Format of the output image",
"default": "webp",
"x-order": 10
},
"guidance_scale": {
"type": "number",
"title": "Guidance Scale",
"default": 7,
"maximum": 20,
"minimum": 1,
"x-order": 5,
"description": "Guidance scale as defined in Classifier-Free Diffusion Guidance. Higher guidance scale encourages images that are closely linked to the text prompt, usually at the expense of lower image quality."
},
"output_quality": {
"type": "integer",
"title": "Output Quality",
"default": 80,
"maximum": 100,
"minimum": 0,
"x-order": 11,
"description": "Quality of the output image, from 0 to 100. 100 is best quality, 0 is lowest quality."
},
"n_pixels_extension": {
"type": "integer",
"title": "N Pixels Extension",
"default": 0,
"x-order": 12,
"description": "Number of pixels to extend the mask by. Higher values will lead to smoother edges."
},
"num_inference_steps": {
"type": "integer",
"title": "Num Inference Steps",
"default": 30,
"maximum": 50,
"minimum": 1,
"x-order": 4,
"description": "Number of denoising steps. More steps usually lead to a higher quality image at the expense of slower inference."
}
}
}
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",
"x-cog-array-type": "iterator"
}