Skip to content

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

Description

@molu-ggg

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions