OpenGVLab/Instruct2Act

Where can I find the "openclip_tokenizer"?

euminds opened this issue · 5 comments

Hi,

In the 90 line of engine_robotic.py, "tokenizer = open_clip.get_tokenizer("/data/openclip_tokenizer", direct_load=True)", where can I find the "openclip_tokenizer"?
The code assumes the openclip_tokenizer exists in the /data directory, but this file does not exist in the OpenCLIP repository. In laion/CLIP-ViT-H-14-laion2B-s32B-b79K, is it tokenizer.json?

In OpenCLIP, I see that openclip_tokenizer may be a function or class rather than a file. If so, the naming of this line of code could be improved, e.g. "tokenizer = open_clip.get_tokenizer(model_path="/data/...", direct_load=True)".

Thanks!

Hi,

thanks for your interest in this project.

We set the direct_load to be true and provided the path since we run this framework in an offline style. You can use it based on your need.

Also, we save it in one self-naming folder, and you can select your preferred ones as long as OpenCLIP has it.

For a pure tokenizer, a json file is already enough.

Bests

nbbb24 commented

Hi,

i'm also running 'engine_robotic.py', but it seems there is something wrong

(open_clip/src/open_clip/factory.py", line 83, in get_tokenizer

TypeError: 'NoneType' object is not subscriptable)

Have you encountered the same problem?
And can you help me solve it?

Thanks!

Hi @nbbb24,

thanks for your interest in this project.

  1. Please follow the readme to prepare the environment and download the pre-trained model.

  2. If the our naming style of openCLIP confuses you, you can direct follow the readme in OpenCLIP, all you need is just get the tokenizer.

If any further problem, please let me know.

nbbb24 commented

Hi @nbbb24,

thanks for your interest in this project.

  1. Please follow the readme to prepare the environment and download the pre-trained model.
  2. If the our naming style of openCLIP confuses you, you can direct follow the readme in OpenCLIP, all you need is just get the tokenizer.

If any further problem, please let me know.

OK, i will check the file

Thank you

Yes. Hope that helps you.

I would close this issue at first, but you can re-open it when needed.