Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -146,9 +146,10 @@ def generate(state, imagebox, textbox, image_process_mode, temperature, top_p, m
|
|
146 |
images = process_images(images, image_processor, model.config)
|
147 |
|
148 |
if type(images) is list:
|
149 |
-
images = [image.to(model.device, dtype=torch.
|
150 |
else:
|
151 |
-
images = images.to(model.device, dtype=torch.
|
|
|
152 |
|
153 |
replace_token = DEFAULT_IMAGE_TOKEN
|
154 |
if getattr(model.config, 'mm_use_im_start_end', False):
|
|
|
146 |
images = process_images(images, image_processor, model.config)
|
147 |
|
148 |
if type(images) is list:
|
149 |
+
images = [image.to(model.device, dtype=torch.bfloat16) for image in images]
|
150 |
else:
|
151 |
+
images = images.to(model.device, dtype=torch.bfloat16)
|
152 |
+
|
153 |
|
154 |
replace_token = DEFAULT_IMAGE_TOKEN
|
155 |
if getattr(model.config, 'mm_use_im_start_end', False):
|