mirror of
				https://github.com/facebookresearch/sam2.git
				synced 2025-11-04 19:42:12 +08:00 
			
		
		
		
	Do not load config from the hub
This commit is contained in:
		
							parent
							
								
									3af4e82263
								
							
						
					
					
						commit
						0c28c630c2
					
				@ -87,9 +87,9 @@ def build_sam2_hf(model_id, **kwargs):
 | 
				
			|||||||
        "facebook/sam2-hiera-large": ("sam2_hiera_l.yaml", "sam2_hiera_large.pt"),
 | 
					        "facebook/sam2-hiera-large": ("sam2_hiera_l.yaml", "sam2_hiera_large.pt"),
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    config_name, checkpoint_name = model_id_to_filenames[model_id]
 | 
					    config_name, checkpoint_name = model_id_to_filenames[model_id]
 | 
				
			||||||
    config_file = hf_hub_download(repo_id=model_id, filename=config_name)
 | 
					    # config_file = hf_hub_download(repo_id=model_id, filename=config_name)
 | 
				
			||||||
    ckpt_path = hf_hub_download(repo_id=model_id, filename=checkpoint_name)
 | 
					    ckpt_path = hf_hub_download(repo_id=model_id, filename=checkpoint_name)
 | 
				
			||||||
    return build_sam2_video_predictor(config_file=config_file, ckpt_path=ckpt_path, **kwargs)
 | 
					    return build_sam2_video_predictor(config_file=config_name, ckpt_path=ckpt_path, **kwargs)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def build_sam2_video_predictor_hf(model_id, **kwargs):
 | 
					def build_sam2_video_predictor_hf(model_id, **kwargs):
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user