Spaces:
Paused
Paused
| from abc import ABC, abstractmethod | |
| import torch | |
| class VideoTokenizer(ABC): | |
| def encode(self, video: torch.Tensor) -> list[torch.Tensor]: | |
| ... | |
| def decode(self, tokens: list[torch.Tensor]) -> torch.Tensor: | |
| ... | |
| def num_layers(self) -> int: | |
| ... | |
| def layer_token_counts(self) -> list[int]: | |
| ... | |
| def name(self) -> str: | |
| ... | |
| class AudioTokenizer(ABC): | |
| def encode(self, audio: torch.Tensor) -> torch.Tensor: | |
| ... | |
| def decode(self, tokens: torch.Tensor) -> torch.Tensor: | |
| ... | |
| def sample_rate(self) -> int: | |
| ... | |
| def num_codebooks(self) -> int: | |
| ... | |
| def name(self) -> str: | |
| ... | |