Skip to content

[Bugfix] Enforce --max-generated-image-size on /v1/images/generations#2599

Merged
david6666666 merged 1 commit intovllm-project:mainfrom
NickCao:fix/enforce-max-generated-image-size
Apr 9, 2026
Merged

[Bugfix] Enforce --max-generated-image-size on /v1/images/generations#2599
david6666666 merged 1 commit intovllm-project:mainfrom
NickCao:fix/enforce-max-generated-image-size

Conversation

@NickCao
Copy link
Copy Markdown
Contributor

@NickCao NickCao commented Apr 8, 2026

Purpose

The /v1/images/edits endpoint validates the requested image size against --max-generated-image-size, but /v1/images/generations does not. Add the same width*height check to generate_images that edit_images already has.

Closes #2586

Test Plan

pytest tests/entrypoints/openai_api/test_image_server.py

Test Result

PASS


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan. Please provide the test scripts & test commands. Please state the reasons if your codes don't require additional test scripts. For test file guidelines, please check the test style doc
  • The test results. Please paste the results comparison before and after, or the e2e results.
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model. Please run mkdocs serve to sync the documentation editions to ./docs.
  • (Optional) Release notes update. If your change is user-facing, please update the release notes draft.

BEFORE SUBMITTING, PLEASE READ https://github.com/vllm-project/vllm-omni/blob/main/CONTRIBUTING.md (anything written below this line will be removed by GitHub Actions)

The /v1/images/edits endpoint validates the requested image size
against --max-generated-image-size, but /v1/images/generations
does not. Add the same width*height check to generate_images that
edit_images already has.

Closes vllm-project#2586

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Nick Cao <ncao@redhat.com>
@NickCao NickCao requested a review from hsliuustc0106 as a code owner April 8, 2026 14:56
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@david6666666
Copy link
Copy Markdown
Collaborator

LGTM. Thanks for your contribution.

@david6666666 david6666666 added the ready label to trigger buildkite CI label Apr 9, 2026
@david6666666 david6666666 enabled auto-merge (squash) April 9, 2026 03:33
@david6666666 david6666666 merged commit 3bd8a52 into vllm-project:main Apr 9, 2026
6 of 8 checks passed
lvliang-intel pushed a commit to lvliang-intel/vllm-omni that referenced this pull request Apr 9, 2026
…vllm-project#2599)

Signed-off-by: Nick Cao <ncao@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
david6666666 added a commit to david6666666/vllm-omni that referenced this pull request Apr 9, 2026
…vllm-project#2599)

Signed-off-by: Nick Cao <ncao@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>

(cherry picked from commit 3bd8a52)
Signed-off-by: David Chen <530634352@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready label to trigger buildkite CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Fix: Enforce --max-generated-image-size limit in image generation requests

2 participants