Open YushunXiang opened 4 months ago
Load OpenCLIP model and tokenizer from local path
Usage:
model, processor = open_clip.create_model_from_pretrained( model_name=f'hf-hub:{model_id}', precision='fp16', cache_dir=cache_dir, ) print(f"Loading tokenizer from {model_args.model_path}") tokenizer = open_clip.get_tokenizer( model_name=f'hf-hub:{model_id}', cache_dir=cache_dir, )
The cache_dir is your local path.
cache_dir
Load OpenCLIP model and tokenizer from local path
Usage:
The
cache_dir
is your local path.