Skip to content

Commit

Permalink
chore(model): add fields for image2image input
Browse files Browse the repository at this point in the history
  • Loading branch information
tonywang10101 committed Dec 3, 2023
1 parent 5a27bfd commit 5a963a8
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 15 deletions.
22 changes: 15 additions & 7 deletions model/model/v1alpha/task_image_to_image.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,25 @@ import "model/model/v1alpha/common.proto";

// ImageToImageInput represents the input of image to image task
message ImageToImageInput {
// Input Image
// The Prompt Image, only for multimodal input
oneof type {
// Image type URL
string image_url = 1;
string prompt_image_url = 1;
// Image type base64
string image_base64 = 2;
string prompt_image_base64 = 2;
}
// The text input of the model
optional string prompt = 3 [(google.api.field_behavior) = OPTIONAL];
// Additional parameters of the model
repeated ExtraParamObject extra_params = 4 [(google.api.field_behavior) = OPTIONAL];
// The prompt text
optional string prompt = 3 [(google.api.field_behavior) = REQUIRED];
// The steps, default is 5
optional int32 steps = 4 [(google.api.field_behavior) = OPTIONAL];
// The guidance scale, default is 7.5
optional float cfg_scale = 5 [(google.api.field_behavior) = OPTIONAL];
// The seed, default is 0
optional int32 seed = 6 [(google.api.field_behavior) = OPTIONAL];
// The number of generated samples, default is 1
optional int32 samples = 7 [(google.api.field_behavior) = OPTIONAL];
// The extra parameters
optional ExtraParamObject extra_params = 8 [(google.api.field_behavior) = OPTIONAL];
}

// ImageToImageOutput represents the output of image to image task
Expand Down
31 changes: 23 additions & 8 deletions openapiv2/openapiv2.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8218,22 +8218,37 @@ definitions:
v1alphaImageToImageInput:
type: object
properties:
image_url:
prompt_image_url:
type: string
title: Image type URL
image_base64:
prompt_image_base64:
type: string
title: Image type base64
prompt:
type: string
title: The text input of the model
title: The prompt text
steps:
type: integer
format: int32
title: The steps, default is 5
cfg_scale:
type: number
format: float
title: The guidance scale, default is 7.5
seed:
type: integer
format: int32
title: The seed, default is 0
samples:
type: integer
format: int32
title: The number of generated samples, default is 1
extra_params:
type: array
items:
type: object
$ref: '#/definitions/v1alphaExtraParamObject'
title: Additional parameters of the model
$ref: '#/definitions/v1alphaExtraParamObject'
title: The extra parameters
title: ImageToImageInput represents the input of image to image task
required:
- prompt
v1alphaImageToImageOutput:
type: object
properties:
Expand Down

0 comments on commit 5a963a8

Please sign in to comment.