Skip to content

[BugFix]: fix a lot of bug#1565

Merged
hsliuustc0106 merged 4 commits intovllm-project:mainfrom
princepride:fix-a-lot-of-bug
Feb 28, 2026
Merged

[BugFix]: fix a lot of bug#1565
hsliuustc0106 merged 4 commits intovllm-project:mainfrom
princepride:fix-a-lot-of-bug

Conversation

@princepride
Copy link
Collaborator

@princepride princepride commented Feb 28, 2026

Purpose

Fix multiple bugs affecting Bagel and GLM-Image model pipelines, including model initialization failures, weight loading errors, and intermittent KV cache transfer issues.

1. Fix Bagel ViT weight loading failures (pipeline_bagel.py)

  • Parameter aliasing: SiglipNaViTWrapper created patch_embed_weight/patch_embed_bias attributes that aliased canonical parameters in patch_embedding, causing false positives in the strict weight loading check. Removed the aliases and access the patch embedding parameters directly in forward().
  • Config mismatch: The ViT config (vit_config.json) specifies 27 layers with a head, but the actual Bagel checkpoint has 26 layers and no head. Added overrides to align the SiglipVisionModel config with the checkpoint.

2. Fix GLM-Image transformer weight loading check failure (pipeline_glm_image.py)

GlmImagePipeline.load_weights() stripped the transformer. prefix before delegating to the transformer, but didn't re-add it to the returned set of loaded weight names. The strict check compared prefixed expected names against unprefixed loaded names, causing all transformer weights to be reported as uninitialized.

3. Fix intermittent KV cache transfer failure (shm_connector.py, chunk_transfer_adapter.py)

SharedMemoryConnector.get() returned (None, 0) on failure, which is truthy, causing the caller's polling loop to exit prematurely and treat a not-yet-ready transfer as a successful zero-byte read. Changed all failure return paths to None (falsy) and added a corresponding None guard in chunk_transfer_adapter.py before tuple unpacking.

4. Fix vllm 0.16.0 import incompatibility (glm_image_ar.py)

from vllm.attention.layer import Attention does not exist in vllm 0.16.0. Updated to the correct path from vllm.model_executor.layers.attention import Attention.

Test Plan

  • Run Bagel end-to-end inference:
python3 examples/offline_inference/bagel/end2end.py --prompts "A cute cat" --modality text2img
  • Run GLM-Image end-to-end inference:
python3 end2end.py --model-path /proj-tango-pvc/users/zhipeng.wang/workspace/models/GLM-Image --prompt "A cat sitting on the table" --output cat.png --config-path /proj-tango-pvc/users/zhipeng.wang/workspace/vllm-omni/vllm_omni/model_executor/stage_configs/glm_image.yaml

Test Result

  • Bagel:
image
  • GLM-Image:
image

Signed-off-by: princepride <wangzhipeng628@gmail.com>
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7c4c436caa

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Signed-off-by: princepride <wangzhipeng628@gmail.com>
Signed-off-by: princepride <wangzhipeng628@gmail.com>
@david6666666 david6666666 added the ready label to trigger buildkite CI label Feb 28, 2026
@hsliuustc0106 hsliuustc0106 merged commit 3d9fa8d into vllm-project:main Feb 28, 2026
6 of 7 checks passed
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