From ff36a29b1780648fa7b7ae32f2cb7fcf70453609 Mon Sep 17 00:00:00 2001 From: Adrian web Date: Thu, 17 Oct 2024 20:26:04 +0200 Subject: [PATCH 1/3] Removed wrong argument target_size Fixing the error: unexpected keyword argument target_size { "inputs": "", "parameters": { "width": 1080, "height": 1352 } } --- docs/api-inference/tasks/text-to-image.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/api-inference/tasks/text-to-image.md b/docs/api-inference/tasks/text-to-image.md index df2bb4d2c..31b0dba22 100644 --- a/docs/api-inference/tasks/text-to-image.md +++ b/docs/api-inference/tasks/text-to-image.md @@ -106,9 +106,8 @@ To use the JavaScript client, see `huggingface.js`'s [package reference](https:/ | **        guidance_scale** | _number_ | A higher guidance scale value encourages the model to generate images closely linked to the text prompt, but values too high may cause saturation and other artifacts. | | **        negative_prompt** | _string[]_ | One or several prompt to guide what NOT to include in image generation. | | **        num_inference_steps** | _integer_ | The number of denoising steps. More denoising steps usually lead to a higher quality image at the expense of slower inference. | -| **        target_size** | _object_ | The size in pixel of the output image | -| **                width*** | _integer_ | | -| **                height*** | _integer_ | | +| **        width*** | _integer_ | | +| **        height*** | _integer_ | | | **        scheduler** | _string_ | Override the scheduler with a compatible one. | | **        seed** | _integer_ | Seed for the random number generator. | From 4c9daa92f2e76576fcdd622e4ce93eeed2fcd8ef Mon Sep 17 00:00:00 2001 From: Adrian web Date: Fri, 1 Nov 2024 10:18:11 +0100 Subject: [PATCH 2/3] Update text-to-image.md Removed extra "*" and added parameters description --- docs/api-inference/tasks/text-to-image.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api-inference/tasks/text-to-image.md b/docs/api-inference/tasks/text-to-image.md index 31b0dba22..9307a584d 100644 --- a/docs/api-inference/tasks/text-to-image.md +++ b/docs/api-inference/tasks/text-to-image.md @@ -106,8 +106,8 @@ To use the JavaScript client, see `huggingface.js`'s [package reference](https:/ | **        guidance_scale** | _number_ | A higher guidance scale value encourages the model to generate images closely linked to the text prompt, but values too high may cause saturation and other artifacts. | | **        negative_prompt** | _string[]_ | One or several prompt to guide what NOT to include in image generation. | | **        num_inference_steps** | _integer_ | The number of denoising steps. More denoising steps usually lead to a higher quality image at the expense of slower inference. | -| **        width*** | _integer_ | | -| **        height*** | _integer_ | | +| **        width** | _integer_ | Image width. | +| **        height** | _integer_ | Image height. | | **        scheduler** | _string_ | Override the scheduler with a compatible one. | | **        seed** | _integer_ | Seed for the random number generator. | From d0029f818e8ed6d119266a6c5aa52d7a54dff686 Mon Sep 17 00:00:00 2001 From: Adrian web Date: Fri, 1 Nov 2024 10:20:37 +0100 Subject: [PATCH 3/3] Update image-to-image.md Removed target_size --- docs/api-inference/tasks/image-to-image.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/api-inference/tasks/image-to-image.md b/docs/api-inference/tasks/image-to-image.md index 1c2f277b3..cd1079e74 100644 --- a/docs/api-inference/tasks/image-to-image.md +++ b/docs/api-inference/tasks/image-to-image.md @@ -51,9 +51,8 @@ No snippet available for this task. | **        guidance_scale** | _number_ | 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** | _string[]_ | One or several prompt to guide what NOT to include in image generation. | | **        num_inference_steps** | _integer_ | 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** | _object_ | The size in pixel of the output image. | -| **                width*** | _integer_ | | -| **                height*** | _integer_ | | +| **        width** | _integer_ | The width in pixel of the output image. | +| **        height** | _integer_ | The heigh in pixel of the output image. | Some options can be configured by passing headers to the Inference API. Here are the available headers: