Spaces:
Runtime error
Runtime error
[Init] models
Browse files- model/blip2_pretrained_flant5xxl.pth +3 -0
- model/videochat_13b.pth +3 -0
- models/eva_vit.py +7 -1
model/blip2_pretrained_flant5xxl.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4b3839ea6c617f315ead9bf4036bbb0f0cf6bf62695ecfc14968ea626af03a29
|
3 |
+
size 433481467
|
model/videochat_13b.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dd78ad4b1fff617ebd603349d9409495b88938135338576e0c76f6268c6f20d0
|
3 |
+
size 825484451
|
models/eva_vit.py
CHANGED
@@ -16,6 +16,9 @@ import torch.nn as nn
|
|
16 |
import torch.nn.functional as F
|
17 |
import torch.utils.checkpoint as checkpoint
|
18 |
from timm.models.layers import drop_path, to_2tuple, trunc_normal_
|
|
|
|
|
|
|
19 |
|
20 |
|
21 |
def _cfg(url='', **kwargs):
|
@@ -588,7 +591,10 @@ def create_eva_vit_g(
|
|
588 |
gmhra_dropout=gmhra_dropout,
|
589 |
)
|
590 |
if vit_model_path is not None and os.path.isfile(vit_model_path):
|
591 |
-
|
|
|
|
|
|
|
592 |
print(f"Load ViT model from: {vit_model_path}")
|
593 |
interpolate_pos_embed(model, state_dict)
|
594 |
msg = load_state_dict(model, state_dict, strict=False)
|
|
|
16 |
import torch.nn.functional as F
|
17 |
import torch.utils.checkpoint as checkpoint
|
18 |
from timm.models.layers import drop_path, to_2tuple, trunc_normal_
|
19 |
+
from timm.models.registry import register_model
|
20 |
+
|
21 |
+
from utils.misc import download_cached_file
|
22 |
|
23 |
|
24 |
def _cfg(url='', **kwargs):
|
|
|
591 |
gmhra_dropout=gmhra_dropout,
|
592 |
)
|
593 |
if vit_model_path is not None and os.path.isfile(vit_model_path):
|
594 |
+
cached_file = download_cached_file(
|
595 |
+
vit_model_path, check_hash=False, progress=True
|
596 |
+
)
|
597 |
+
state_dict = torch.load(cached_file, map_location="cpu")
|
598 |
print(f"Load ViT model from: {vit_model_path}")
|
599 |
interpolate_pos_embed(model, state_dict)
|
600 |
msg = load_state_dict(model, state_dict, strict=False)
|