jcccy commited on
Commit
02c8781
·
1 Parent(s): 3e17c15

change cuda

Browse files
Files changed (1) hide show
  1. minigpt4/conversation/conversation.py +11 -11
minigpt4/conversation/conversation.py CHANGED
@@ -675,11 +675,11 @@ class Chat:
675
  # thread0.join()
676
  # thread1.join()
677
 
678
- # try:
679
- # self.model_list[0].to('cuda')
680
- # answer = self.model_list[0].generate_step(lr_img_list_combination, confidence_instruction, hr_img_list_combination)
681
- # except Exception as e:
682
- # print('model_0 error',e)
683
 
684
  try:
685
  self.model_list[1].to('cuda')
@@ -778,11 +778,11 @@ class Chat:
778
  # answer = answer[0]
779
  # answer_new = answer_new[0]
780
 
781
- # try:
782
- # self.model_list[0].to('cuda')
783
- # answer = self.model_list[0].generate_step(lr_img_list_combination, confidence_instruction, hr_img_list_combination)
784
- # except Exception as e:
785
- # print('model_0 error',e)
786
 
787
  try:
788
  self.model_list[1].to('cuda')
@@ -790,7 +790,7 @@ class Chat:
790
  except Exception as e:
791
  print('model_1 error',e)
792
 
793
- answer=answer_new
794
  output_text=answer
795
 
796
  answer_list.append(answer_new)
 
675
  # thread0.join()
676
  # thread1.join()
677
 
678
+ try:
679
+ self.model_list[0].to('cuda')
680
+ answer = self.model_list[0].generate_step(lr_img_list_combination, confidence_instruction, hr_img_list_combination)
681
+ except Exception as e:
682
+ print('model_0 error',e)
683
 
684
  try:
685
  self.model_list[1].to('cuda')
 
778
  # answer = answer[0]
779
  # answer_new = answer_new[0]
780
 
781
+ try:
782
+ self.model_list[0].to('cuda')
783
+ answer = self.model_list[0].generate_step(lr_img_list_combination, confidence_instruction, hr_img_list_combination)
784
+ except Exception as e:
785
+ print('model_0 error',e)
786
 
787
  try:
788
  self.model_list[1].to('cuda')
 
790
  except Exception as e:
791
  print('model_1 error',e)
792
 
793
+ # answer=answer_new
794
  output_text=answer
795
 
796
  answer_list.append(answer_new)