[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:
Hongsheng Liuandamy-why-3459 authored and GitHub committed 2026-09-13 10:05:56 +08:00
1 parent f7d9deb45a
commit 01a2f93256
4 files changed
+101 -1

No files matched your search

+3 -1
View File
@@ -1605,7 +1605,9 @@ def _build_image_generation_response(
output_format = _choose_output_format(request.output_format or "png", None)
image_data = [
ImageData(
b64_json=encode_image_base64_with_compression(image, format=output_format),
b64_json=encode_image_base64_with_compression(
image, format=output_format, output_compression=request.output_compression
),
revised_prompt=None,
)
for image in images