luca-medeiros / lang-segment-anything

SAM with text prompt
Apache License 2.0
1.53k stars 167 forks source link

In lang_sam.py file, I detect that the model = build_model(args) command of the load_model_hf function cannot be executed. #58

Open liuwenxin0410 opened 4 months ago

liuwenxin0410 commented 4 months ago

In lang_sam.py file, I detect that the model = build_model(args) command of the load_model_hf function cannot be executed. Why? thank you

def load_model_hf(repo_id, filename, ckpt_config_filename, device='cpu'): cache_config_file = hf_hub_download(repo_id=repo_id, filename=ckpt_config_filename)

args = SLConfig.fromfile(cache_config_file)
model = build_model(args)
args.device = device