update
Browse files- README.md +2 -2
- config.json +1 -1
- preprocessor_config.json +2 -2
README.md
CHANGED
@@ -24,11 +24,11 @@ from transformers import AutoModel, CLIPImageProcessor
|
|
24 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
25 |
|
26 |
model = AutoModel.from_pretrained(
|
27 |
-
'jienengchen/ViTamin-L-
|
28 |
trust_remote_code=True).to(device).eval()
|
29 |
|
30 |
image = Image.open('./image.png').convert('RGB')
|
31 |
-
image_processor = CLIPImageProcessor.from_pretrained('jienengchen/ViTamin-L-
|
32 |
|
33 |
pixel_values = image_processor(images=image, return_tensors='pt').pixel_values
|
34 |
pixel_values = pixel_values.to(torch.bfloat16).cuda()
|
|
|
24 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
25 |
|
26 |
model = AutoModel.from_pretrained(
|
27 |
+
'jienengchen/ViTamin-L-384px',
|
28 |
trust_remote_code=True).to(device).eval()
|
29 |
|
30 |
image = Image.open('./image.png').convert('RGB')
|
31 |
+
image_processor = CLIPImageProcessor.from_pretrained('jienengchen/ViTamin-L-384px')
|
32 |
|
33 |
pixel_values = image_processor(images=image, return_tensors='pt').pixel_values
|
34 |
pixel_values = pixel_values.to(torch.bfloat16).cuda()
|
config.json
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
"timm_proj": "linear",
|
16 |
"timm_drop": 0.0,
|
17 |
"timm_drop_path": 0.1,
|
18 |
-
"image_size":
|
19 |
},
|
20 |
"text_cfg": {
|
21 |
"context_length": 77,
|
|
|
15 |
"timm_proj": "linear",
|
16 |
"timm_drop": 0.0,
|
17 |
"timm_drop_path": 0.1,
|
18 |
+
"image_size": 384
|
19 |
},
|
20 |
"text_cfg": {
|
21 |
"context_length": 77,
|
preprocessor_config.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
{
|
2 |
-
"crop_size":
|
3 |
"do_center_crop": true,
|
4 |
"do_normalize": true,
|
5 |
"do_resize": true,
|
@@ -15,6 +15,6 @@
|
|
15 |
0.27577711
|
16 |
],
|
17 |
"resample": 3,
|
18 |
-
"size":
|
19 |
}
|
20 |
|
|
|
1 |
{
|
2 |
+
"crop_size": 384,
|
3 |
"do_center_crop": true,
|
4 |
"do_normalize": true,
|
5 |
"do_resize": true,
|
|
|
15 |
0.27577711
|
16 |
],
|
17 |
"resample": 3,
|
18 |
+
"size": 384
|
19 |
}
|
20 |
|