Spaces:
Runtime error
Runtime error
Update model_worker.py
Browse files- model_worker.py +2 -1
model_worker.py
CHANGED
@@ -90,7 +90,8 @@ 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.float16)
|
|
|
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 |
+
images = images.to(self.model.device, dtype=torch.bfloat16)
|
95 |
patch_positions = patch_positions.to(self.model.device)
|
96 |
|
97 |
replace_token = DEFAULT_IMAGE_TOKEN
|