srimanth-d commited on
Commit
edc7f37
·
verified ·
1 Parent(s): 15194a3

Update modeling_got.py

Browse files
Files changed (1) hide show
  1. modeling_got.py +2 -2
modeling_got.py CHANGED
@@ -583,7 +583,7 @@ class GOTQwenForCausalLM(Qwen2ForCausalLM):
583
  elif device == "mps" or device == "cpu":
584
  output_ids = self.generate(
585
  input_ids,
586
- images=[image_tensor_1.to(device)],
587
  do_sample=False,
588
  num_beams = 1,
589
  no_repeat_ngram_size = 20,
@@ -609,7 +609,7 @@ class GOTQwenForCausalLM(Qwen2ForCausalLM):
609
  elif device == "mps" or device == "cpu":
610
  output_ids = self.generate(
611
  input_ids,
612
- images=[image_tensor_1.to(device)],
613
  do_sample=False,
614
  num_beams = 1,
615
  no_repeat_ngram_size = 20,
 
583
  elif device == "mps" or device == "cpu":
584
  output_ids = self.generate(
585
  input_ids,
586
+ images=[image_tensor_1.unsqueeze(0).to(device)],
587
  do_sample=False,
588
  num_beams = 1,
589
  no_repeat_ngram_size = 20,
 
609
  elif device == "mps" or device == "cpu":
610
  output_ids = self.generate(
611
  input_ids,
612
+ images=[image_tensor_1.unsqueeze(0).to(device)],
613
  do_sample=False,
614
  num_beams = 1,
615
  no_repeat_ngram_size = 20,