Skip to content

Commit c9430bd

Browse files
authored
Add 'prompt' input to image-to-image specs (#1313)
Seems like we've forgotten the most important parameter 😄 Already used in https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0 widget even though we've not documented it properly in the specs.
1 parent 9e70c38 commit c9430bd

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ export interface ImageToImageParameters {
3636
* a higher quality image at the expense of slower inference.
3737
*/
3838
num_inference_steps?: number;
39+
/**
40+
* The text prompt to guide the image generation.
41+
*/
42+
prompt?: string;
3943
/**
4044
* The size in pixel of the output image.
4145
*/

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
"title": "ImageToImageParameters",
2121
"type": "object",
2222
"properties": {
23+
"prompt": {
24+
"type": "string",
25+
"description": "The text prompt to guide the image generation."
26+
},
2327
"guidance_scale": {
2428
"type": "number",
2529
"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."

0 commit comments

Comments
 (0)