Spaces:
Paused
Paused
Update main.py
Browse files
main.py
CHANGED
@@ -5,7 +5,7 @@ import torch
|
|
5 |
|
6 |
app = FastAPI()
|
7 |
|
8 |
-
checkpoint = "Qwen/Qwen2.5-VL-
|
9 |
min_pixels = 256*28*28
|
10 |
max_pixels = 1280*28*28
|
11 |
processor = AutoProcessor.from_pretrained(
|
@@ -16,7 +16,7 @@ processor = AutoProcessor.from_pretrained(
|
|
16 |
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
|
17 |
checkpoint,
|
18 |
torch_dtype=torch.bfloat16,
|
19 |
-
device_map="
|
20 |
# attn_implementation="flash_attention_2",
|
21 |
)
|
22 |
|
|
|
5 |
|
6 |
app = FastAPI()
|
7 |
|
8 |
+
checkpoint = "Qwen/Qwen2.5-VL-3B-Instruct"
|
9 |
min_pixels = 256*28*28
|
10 |
max_pixels = 1280*28*28
|
11 |
processor = AutoProcessor.from_pretrained(
|
|
|
16 |
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
|
17 |
checkpoint,
|
18 |
torch_dtype=torch.bfloat16,
|
19 |
+
device_map="auto",
|
20 |
# attn_implementation="flash_attention_2",
|
21 |
)
|
22 |
|