Update backPrompt.py
Browse files- backPrompt.py +1 -1
backPrompt.py
CHANGED
@@ -36,7 +36,7 @@ def main(image_path):
|
|
36 |
use_flash_attn=True,
|
37 |
trust_remote_code=True).eval()
|
38 |
tokenizer = AutoTokenizer.from_pretrained(path, trust_remote_code=True, use_fast=False)
|
39 |
-
pixel_values = load_image(image_path).to(torch.
|
40 |
generation_config = dict(max_new_tokens=1024, do_sample=True)
|
41 |
|
42 |
question = """<image>\n**Instruction:**
|
|
|
36 |
use_flash_attn=True,
|
37 |
trust_remote_code=True).eval()
|
38 |
tokenizer = AutoTokenizer.from_pretrained(path, trust_remote_code=True, use_fast=False)
|
39 |
+
pixel_values = load_image(image_path).to(torch.float32).to("cpu")
|
40 |
generation_config = dict(max_new_tokens=1024, do_sample=True)
|
41 |
|
42 |
question = """<image>\n**Instruction:**
|