Spaces:
Sleeping
Sleeping
Commit
·
2a7381c
1
Parent(s):
3ab6021
fixing function to load
Browse files
main.py
CHANGED
@@ -42,9 +42,10 @@ max_pixels = 1280 * 28 * 28
|
|
42 |
processor = AutoProcessor.from_pretrained(
|
43 |
checkpoint, min_pixels=min_pixels, max_pixels=max_pixels
|
44 |
)
|
45 |
-
model =
|
46 |
checkpoint,
|
47 |
-
torch_dtype=torch.bfloat16,
|
|
|
48 |
device_map="auto",
|
49 |
# attn_implementation="flash_attention_2",
|
50 |
)
|
|
|
42 |
processor = AutoProcessor.from_pretrained(
|
43 |
checkpoint, min_pixels=min_pixels, max_pixels=max_pixels
|
44 |
)
|
45 |
+
model = Qwen2VLForConditionalGeneration.from_pretrained(
|
46 |
checkpoint,
|
47 |
+
# torch_dtype=torch.bfloat16,
|
48 |
+
torch_dtype="auto",
|
49 |
device_map="auto",
|
50 |
# attn_implementation="flash_attention_2",
|
51 |
)
|