Skip to content

Commit 9d8cb9a

Browse files
Update image-to-image target size param docstring (#1788)
Related to huggingface/huggingface_hub#3399, some providers or models may ignore this parameter if it's not supported. This PR updates the docstring to make that clearer and align it with the one in `huggingface_hub`.
1 parent 20e5e11 commit 9d8cb9a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/tasks/src/tasks/image-to-image/inference.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,15 @@ export interface ImageToImageParameters {
4141
*/
4242
prompt?: string;
4343
/**
44-
* The size in pixel of the output image.
44+
* The size in pixels of the output image. This parameter is only supported by some
45+
* providers and for specific models. It will be ignored when unsupported.
4546
*/
4647
target_size?: TargetSize;
4748
[property: string]: unknown;
4849
}
4950
/**
50-
* The size in pixel of the output image.
51+
* The size in pixels of the output image. This parameter is only supported by some
52+
* providers and for specific models. It will be ignored when unsupported.
5153
*/
5254
export interface TargetSize {
5355
height: number;

packages/tasks/src/tasks/image-to-image/spec/input.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
},
3939
"target_size": {
4040
"type": "object",
41-
"description": "The size in pixel of the output image.",
41+
"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.",
4242
"properties": {
4343
"width": {
4444
"type": "integer"

0 commit comments

Comments
 (0)