[Debug] Update GLM-Image Pipeline#1049
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 814ce4a4e6
ℹ️ 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".
| condition_grid = image_grid_thw[:-1] | ||
| prior_token_image_embed = self.vision_language_encoder.get_image_features( | ||
| inputs["pixel_values"], condition_grid | ||
| ) | ||
| ).pooler_output | ||
| prior_token_image_embed = torch.cat(prior_token_image_embed, dim=0) |
There was a problem hiding this comment.
Remove torch.cat on pooled image features tensor
With the new .pooler_output access, prior_token_image_embed is a single tensor (the pooled image features). torch.cat(prior_token_image_embed, dim=0) now raises TypeError: cat() received an invalid combination of arguments because torch.cat requires a sequence of tensors, not a tensor. This will crash image-edit requests that include condition images (the only path where this block runs). Consider using the tensor directly (or wrapping it in a list only if you truly need to concatenate multiple tensors).
Useful? React with 👍 / 👎.
|
LGTM |
Co-authored-by: root <root@hk01dgx028.cm.cluster>
Purpose
This PR tries to update the GLM image fixing the bug in #1017 .
Test Plan
Tested for the same cmd:
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.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)