Merge b118307608 into a1d071733d
This commit is contained in:
commit
159081c68c
|
|
@ -2,7 +2,7 @@ import hashlib
|
|||
import os
|
||||
import urllib
|
||||
import warnings
|
||||
from typing import Any, Union, List
|
||||
from typing import Any, Union, List, Sequence
|
||||
from pkg_resources import packaging
|
||||
|
||||
import torch
|
||||
|
|
@ -202,7 +202,7 @@ def load(name: str, device: Union[str, torch.device] = "cuda" if torch.cuda.is_a
|
|||
return model, _transform(model.input_resolution.item())
|
||||
|
||||
|
||||
def tokenize(texts: Union[str, List[str]], context_length: int = 77, truncate: bool = False) -> Union[torch.IntTensor, torch.LongTensor]:
|
||||
def tokenize(texts: Union[str, Sequence[str]], context_length: int = 77, truncate: bool = False) -> Union[torch.IntTensor, torch.LongTensor]:
|
||||
"""
|
||||
Returns the tokenized representation of given input string(s)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue