You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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'
The text was updated successfully, but these errors were encountered:
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
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'
The text was updated successfully, but these errors were encountered: