@huggingface/tasks
Version:
List of ML tasks for huggingface.co/tasks
57 lines (56 loc) • 1.89 kB
JSON
{
"$id": "/inference/schemas/image-to-image/input.json",
"$schema": "http://json-schema.org/draft-06/schema#",
"description": "Inputs for Image To Image inference",
"title": "ImageToImageInput",
"type": "object",
"properties": {
"inputs": {
"type": "string",
"description": "The input image data as a base64-encoded string. If no `parameters` are provided, you can also provide the image data as a raw bytes payload.",
"comment": "type=binary"
},
"parameters": {
"description": "Additional inference parameters for Image To Image",
"$ref": "#/$defs/ImageToImageParameters"
}
},
"$defs": {
"ImageToImageParameters": {
"title": "ImageToImageParameters",
"type": "object",
"properties": {
"prompt": {
"type": "string",
"description": "The text prompt to guide the image generation."
},
"guidance_scale": {
"type": "number",
"description": "For diffusion models. A higher guidance scale value encourages the model to generate images closely linked to the text prompt at the expense of lower image quality."
},
"negative_prompt": {
"type": "string",
"description": "One prompt to guide what NOT to include in image generation."
},
"num_inference_steps": {
"type": "integer",
"description": "For diffusion models. The number of denoising steps. More denoising steps usually lead to a higher quality image at the expense of slower inference."
},
"target_size": {
"type": "object",
"description": "The size in pixels of the output image. This parameter is only supported by some providers and for specific models. It will be ignored when unsupported.",
"properties": {
"width": {
"type": "integer"
},
"height": {
"type": "integer"
}
},
"required": ["width", "height"]
}
}
}
},
"required": ["inputs"]
}