Skip to content

Commit 33f6e95

Browse files
committed
Apply suggestions
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
1 parent 901e13c commit 33f6e95

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

vllm/model_executor/models/vision.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,10 @@ def resolve_visual_encoder_outputs(
169169
]
170170

171171
# Apply post-norm on the final hidden state if we are using it
172-
uses_last_layer = select_layers[-1] in (len(hs_pool) - 1, -1)
172+
uses_last_layer = select_layers[-1] in (max_possible_layers - 1, -1)
173173
if post_layer_norm is not None and uses_last_layer:
174-
hs_pool[-1] = post_layer_norm(encoder_outputs)
174+
hs_pool[-1] = post_layer_norm(hs_pool[-1])
175+
175176
return torch.cat(hs_pool, dim=-1)
176177

177178

0 commit comments

Comments
 (0)