apiantonio's picture
Fix transformers 4.x/5.x compat, implement output_hidden_states/attentions and out_layers, fix hierarchical predictor input, add video processor
4bec704 verified
Raw
History Blame Contribute Delete
761 Bytes
"""V-JEPA 2.1 — HuggingFace port."""
from .configuration_vjepa21 import VJEPA21Config
from .modeling_vjepa21 import (
VJEPA21ForVideoClassification,
VJEPA21Model,
VJEPA21PreTrainedModel,
)
__all__ = [
"VJEPA21Config",
"VJEPA21Model",
"VJEPA21PreTrainedModel",
"VJEPA21ForVideoClassification",
]
# `BaseVideoProcessor` needs torchvision. Import it lazily so that a runtime
# without torchvision can still load the model; `AutoVideoProcessor` resolves the
# class through `auto_map` and does not go through this file.
try: # pragma: no cover - depends on the environment
from .video_processing_vjepa21 import VJEPA21VideoProcessor
__all__.append("VJEPA21VideoProcessor")
except ImportError: # pragma: no cover
pass