mlfoundations / open_flamingo

An open-source framework for training large multimodal models.
MIT License
3.75k stars 284 forks source link

TypeError: Flamingo.__init__() got an unexpected keyword argument 'cache_dir' #290

Open Mei0211 opened 9 months ago

Mei0211 commented 9 months ago

from open_flamingo import create_model_and_transforms

model, image_processor, tokenizer = create_model_and_transforms( clip_vision_encoder_path="ViT-L-14", clip_vision_encoder_pretrained="openai", lang_encoder_path="anas-awadalla/mpt-1b-redpajama-200b", tokenizer_path="anas-awadalla/mpt-1b-redpajama-200b", cross_attn_every_n_layers=1, cache_dir="" # Defaults to ~/.cache ) when I run this code, this issue occurs: TypeError: Flamingo.init() got an unexpected keyword argument 'cache_dir'

Paul-Liyb commented 7 months ago

it is because the version in github is later than the one in the pip package(open-flamingo). Try replacing the factory.py in the open-flamingo with the one in the github