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