Skip to content

[BugFix]: Fix bagel single-stage img2img fallback to text2img bug#2397

Merged
ywang96 merged 2 commits intovllm-project:mainfrom
princepride:fix-bagel-single-stage-img2img-bug
Apr 1, 2026
Merged

[BugFix]: Fix bagel single-stage img2img fallback to text2img bug#2397
ywang96 merged 2 commits intovllm-project:mainfrom
princepride:fix-bagel-single-stage-img2img-bug

Conversation

@princepride
Copy link
Copy Markdown
Collaborator

PLEASE FILL IN THE PR DESCRIPTION HERE ENSURING ALL CHECKLIST ITEMS (AT THE BOTTOM) HAVE BEEN CONSIDERED.

Purpose

When there is no injected KV cache:

 image_input = (first_prompt.get("multi_modal_data") or {}).get("image")

However, the key stored in the prompt is "img2img" instead of "image", which results in image_input = None. Consequently, the image is completely ignored, and the process degrades into a pure text-to-image (text2img) generation.

Test Plan

python3 examples/offline_inference/bagel/end2end.py   --stage-configs-path vllm_omni/model_executor/stage_configs/bagel_single_stage.yaml --modality img2img   --image-path women.jpg   --prompts "Let the woman wear a blue dress"

Test Result

Before:

image

After:

image
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)

Signed-off-by: princepride <wangzhipeng628@gmail.com>
@princepride princepride changed the title [BugFix]: fix bagel single-stage img2img bug [BugFix]: Fix bagel single-stage img2img fallback to text2img bug Apr 1, 2026
@ywang96 ywang96 added the ready label to trigger buildkite CI label Apr 1, 2026
@ywang96 ywang96 enabled auto-merge (squash) April 1, 2026 09:05
@ywang96 ywang96 merged commit bf5bd0a into vllm-project:main Apr 1, 2026
7 of 8 checks passed
vraiti pushed a commit to vraiti/vllm-omni that referenced this pull request Apr 9, 2026
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.

3 participants