Skip to content

Commit

Permalink
Fix local variable 'image_features' referenced before assignment (#1383)
Browse files Browse the repository at this point in the history
  • Loading branch information
vidyasiv authored Oct 1, 2024
1 parent 1b8a3f7 commit 2332afb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion optimum/habana/transformers/models/llava/modeling_llava.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ def forward(

# 1. Extra the input embeddings
inputs_embeds = self.get_input_embeddings()(input_ids)


image_features = None
# 2. Merge text and images
if pixel_values is not None and input_ids.shape[1] != 1:
image_outputs = self.vision_tower(
Expand Down

0 comments on commit 2332afb

Please sign in to comment.