Update README.md
Browse files
README.md
CHANGED
|
@@ -104,13 +104,11 @@ model = AutoModel.from_pretrained(
|
|
| 104 |
trust_remote_code=True,
|
| 105 |
dtype=torch.bfloat16,
|
| 106 |
attn_implementation="flash_attention_2",
|
| 107 |
-
)
|
| 108 |
model.to("cuda")
|
| 109 |
|
| 110 |
# Encode features
|
| 111 |
-
encoded_patches, deepstack_features = model.
|
| 112 |
-
images.to("cuda"), grid_thw=grid_thw.to("cuda")
|
| 113 |
-
)
|
| 114 |
print(encoded_patches.shape)
|
| 115 |
# (800, 1152)
|
| 116 |
```
|
|
|
|
| 104 |
trust_remote_code=True,
|
| 105 |
dtype=torch.bfloat16,
|
| 106 |
attn_implementation="flash_attention_2",
|
| 107 |
+
).encoder
|
| 108 |
model.to("cuda")
|
| 109 |
|
| 110 |
# Encode features
|
| 111 |
+
encoded_patches, deepstack_features = model(images.to("cuda"), grid_thw=grid_thw.to("cuda"))
|
|
|
|
|
|
|
| 112 |
print(encoded_patches.shape)
|
| 113 |
# (800, 1152)
|
| 114 |
```
|