[BugFix] Fix NoneType' object has no attribute 'detach'#2797
Merged
linyueqian merged 1 commit intovllm-project:mainfrom Apr 14, 2026
Merged
[BugFix] Fix NoneType' object has no attribute 'detach'#2797linyueqian merged 1 commit intovllm-project:mainfrom
linyueqian merged 1 commit intovllm-project:mainfrom
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Contributor
Author
|
@Sy0307 @linyueqian @yenuo26 PTAL |
Signed-off-by: amy-why-3459 <wuhaiyan17@huawei.com>
gcanlin
reviewed
Apr 14, 2026
| if isinstance(element, torch.Tensor): | ||
| element = element.clone() | ||
| mm_payload[k] = element | ||
| element = v[idx] if idx < len(v) else v[0] |
Collaborator
There was a problem hiding this comment.
Could you also sync the code to NPUARModelRunner please?
Contributor
Author
There was a problem hiding this comment.
This was modified in this PR #2690, and it was found that npu_ar_model_runner.py was not modified, so NPU does not need to be modified.
element = v[idx] if idx < len(v) else v[0]
# Clone tensors to avoid cross-request aliasing
if isinstance(element, torch.Tensor):
element = element.clone()
mm_payload[k] = element
Contributor
Author
|
@linyueqian @Gaohan123 @gcanlin @hsliuustc0106 I think this PR is ready and can be merged. Ideally, it should be merged tonight, otherwise it will affect the nightly test results. |
y123456y78
pushed a commit
to y123456y78/vllm-omni
that referenced
this pull request
Apr 15, 2026
…#2797) Signed-off-by: amy-why-3459 <wuhaiyan17@huawei.com>
y123456y78
pushed a commit
to y123456y78/vllm-omni
that referenced
this pull request
Apr 16, 2026
…#2797) Signed-off-by: amy-why-3459 <wuhaiyan17@huawei.com>
lvliang-intel
pushed a commit
to lvliang-intel/vllm-omni
that referenced
this pull request
Apr 20, 2026
…#2797) Signed-off-by: amy-why-3459 <wuhaiyan17@huawei.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PLEASE FILL IN THE PR DESCRIPTION HERE ENSURING ALL CHECKLIST ITEMS (AT THE BOTTOM) HAVE BEEN CONSIDERED.
Purpose
fix #2788
When the key is something like tts_bos_embed, idx will be greater than len(v), causing the key to not be assigned a value, thus resulting in None when detaching.
Test Plan
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model. Please runmkdocs serveto sync the documentation editions to./docs.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)