From 3e2cfcee4618e45490c794aed8248d52707e6fcd Mon Sep 17 00:00:00 2001 From: Wauplin <11801849+Wauplin@users.noreply.github.com> Date: Wed, 8 Oct 2025 03:11:40 +0000 Subject: [PATCH] Update inference types (automated commit) --- src/huggingface_hub/inference/_client.py | 3 ++- src/huggingface_hub/inference/_generated/_async_client.py | 3 ++- .../inference/_generated/types/image_to_image.py | 8 ++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/huggingface_hub/inference/_client.py b/src/huggingface_hub/inference/_client.py index 5ffa9680d0..092512bf33 100644 --- a/src/huggingface_hub/inference/_client.py +++ b/src/huggingface_hub/inference/_client.py @@ -1287,7 +1287,8 @@ def image_to_image( The model to use for inference. Can be a model ID hosted on the Hugging Face Hub or a URL to a deployed Inference Endpoint. This parameter overrides the model defined at the instance level. Defaults to None. target_size (`ImageToImageTargetSize`, *optional*): - The size in pixel of the output image. This parameter is only supported by some providers and for specific models. It will be ignored when unsupported. + 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. Returns: `Image`: The translated image. diff --git a/src/huggingface_hub/inference/_generated/_async_client.py b/src/huggingface_hub/inference/_generated/_async_client.py index 9df25591a1..e5809617ec 100644 --- a/src/huggingface_hub/inference/_generated/_async_client.py +++ b/src/huggingface_hub/inference/_generated/_async_client.py @@ -1332,7 +1332,8 @@ async def image_to_image( The model to use for inference. Can be a model ID hosted on the Hugging Face Hub or a URL to a deployed Inference Endpoint. This parameter overrides the model defined at the instance level. Defaults to None. target_size (`ImageToImageTargetSize`, *optional*): - The size in pixel of the output image. This parameter is only supported by some providers and for specific models. It will be ignored when unsupported. + 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. Returns: `Image`: The translated image. diff --git a/src/huggingface_hub/inference/_generated/types/image_to_image.py b/src/huggingface_hub/inference/_generated/types/image_to_image.py index a4eff6d191..b14c79fedf 100644 --- a/src/huggingface_hub/inference/_generated/types/image_to_image.py +++ b/src/huggingface_hub/inference/_generated/types/image_to_image.py @@ -10,7 +10,9 @@ @dataclass_with_extra class ImageToImageTargetSize(BaseInferenceType): - """The size in pixel of the output image.""" + """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. + """ height: int width: int @@ -33,7 +35,9 @@ class ImageToImageParameters(BaseInferenceType): prompt: Optional[str] = None """The text prompt to guide the image generation.""" target_size: Optional[ImageToImageTargetSize] = None - """The size in pixel of the output image. This parameter is only supported by some providers and for specific models. It will be ignored when unsupported.""" + """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. + """ @dataclass_with_extra