Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Mei0211 opened this issue Feb 21, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Mei0211
Copy link

Mei0211 commented Feb 21, 2024

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'

@Mei0211 Mei0211 added the bug Something isn't working label Feb 21, 2024
@Paul-Liyb
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants