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

[Question]:ALtCLIp : local variable 'model_id' referenced before assignment #569

Open
molu-ggg opened this issue Apr 7, 2024 · 0 comments
Labels
question Further information is requested

Comments

@molu-ggg
Copy link

molu-ggg commented Apr 7, 2024

Description

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
loader = AutoLoader(
    task_name="txt_img_matching",
    model_name="AltCLIP-XLMR-L",   # Load the checkpoints from Modelhub(model.baai.ac.cn/models)
    model_dir=model_dir,
)   

Bug:

File "/home/notebook/code/personal/test/recognize_anything_model_plus/model_test.py", line 21, in
load_altclip()
File "/home/notebook/code/personal/test/recognize_anything_model_plus/model_test.py", line 6, in load_altclip
loader = AutoLoader(
File "/opt/conda/envs/ram/lib/python3.9/site-packages/flagai/auto_model/auto_loader.py", line 333, in init
self.model = getattr(LazyImport(self.model_name[0]),
File "/opt/conda/envs/ram/lib/python3.9/site-packages/flagai/model/mm/AltCLIP.py", line 446, in from_pretrain
super().download(download_path, model_name, only_download_config=only_download_config)
File "/opt/conda/envs/ram/lib/python3.9/site-packages/flagai/model/base_model.py", line 263, in download
if model_id and model_id != "null":
UnboundLocalError: local variable 'model_id' referenced before assignment

@molu-ggg molu-ggg added the question Further information is requested label Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant