AnwenHu commited on
Commit
a32c6bb
1 Parent(s): 46d4740

Update model_worker.py

Browse files
Files changed (1) hide show
  1. model_worker.py +1 -1
model_worker.py CHANGED
@@ -90,7 +90,7 @@ class ModelWorker:
90
  assert prompt.count(DEFAULT_IMAGE_TOKEN) == 1
91
 
92
  images, patch_positions, prompt = self.doc_image_processor(images=image, query=prompt)
93
- images = images.to(self.model.device, dtype=torch.float)
94
  patch_positions = patch_positions.to(self.model.device)
95
 
96
  replace_token = DEFAULT_IMAGE_TOKEN
 
90
  assert prompt.count(DEFAULT_IMAGE_TOKEN) == 1
91
 
92
  images, patch_positions, prompt = self.doc_image_processor(images=image, query=prompt)
93
+ images = images.to(self.model.device, dtype=torch.float16)
94
  patch_positions = patch_positions.to(self.model.device)
95
 
96
  replace_token = DEFAULT_IMAGE_TOKEN