facebookresearch / ImageBind

ImageBind One Embedding Space to Bind Them All
Other
8.25k stars 759 forks source link

`load_and_transform_text` method exec failed #101

Closed xsank closed 10 months ago

xsank commented 10 months ago

test code

device = "cuda:0" if torch.cuda.is_available() else "cpu"
model = imagebind_model.imagebind_huge(pretrained=True)
model.eval()
model.to(device)
model({
        ModalityType.TEXT: data.load_and_transform_text(['cat'], device)
    })

exception:

  File "/Users/xsank/Self/code/python/flask-elastic-multi-media-search/multi_media_embeddings/multi-media-embeddings.py", line 177, in main
    ModalityType.TEXT: data.load_and_transform_text(['cat'], device)
  File "/Users/xsank/Self/code/python/flask-elastic-image-search/venv/lib/python3.9/site-packages/imagebind/data.py", line 108, in load_and_transform_text
    tokenizer = SimpleTokenizer(bpe_path=BPE_PATH)
  File "/Users/xsank/Self/code/python/flask-elastic-image-search/venv/lib/python3.9/site-packages/imagebind/models/multimodal_preprocessors.py", line 502, in __init__
    with g_pathmgr.open(bpe_path, "rb") as fh:
  File "/Users/xsank/Self/code/python/flask-elastic-image-search/venv/lib/python3.9/site-packages/iopath/common/file_io.py", line 1062, in open
    bret = handler._open(path, mode, buffering=buffering, **kwargs)  # type: ignore
  File "/Users/xsank/Self/code/python/flask-elastic-image-search/venv/lib/python3.9/site-packages/iopath/common/file_io.py", line 645, in _open
    return open(  # type: ignore
FileNotFoundError: [Errno 2] No such file or directory: 'bpe/bpe_simple_vocab_16e6.txt.gz'
xsank commented 10 months ago

manually download the tgz can fix this...