[Bugfix][Frontend] Honor output_compression on the image generations route (#7447)
Signed-off-by: hsliu_ustc <hsliu_ustc@noreply.gitcode.com> Signed-off-by: amy-why-3459 <wuhaiyan17@huawei.com> Co-authored-by: amy-why-3459 <wuhaiyan17@huawei.com>
This commit is contained in:
1 parent
f7d9deb45a
commit
01a2f93256
4 files changed
+101
-1
No files matched your search
@@ -175,6 +175,17 @@ class ImageGenerationRequest(BaseModel):
|
||||
default=None,
|
||||
description="Output image format: 'png', 'jpeg', or 'webp'. Defaults to 'png'.",
|
||||
)
|
||||
output_compression: int = Field(
|
||||
default=100,
|
||||
ge=0,
|
||||
le=100,
|
||||
description=(
|
||||
"Compression level 0-100. For 'jpeg'/'webp' this is the encoder "
|
||||
"quality. For 'png' 100 keeps the fastest, least-compressed "
|
||||
"encode and lower values trade encode time for smaller payloads "
|
||||
"(100 -> compress_level 0, 1 -> compress_level 9)."
|
||||
),
|
||||
)
|
||||
return_stage_metrics: bool | None = Field(
|
||||
default=None,
|
||||
description="Return stage metrics for benchmark clients.",
|
||||
|
||||
Reference in new issue
Block a user