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

RuntimeError #59

Open
sisyphus229 opened this issue May 7, 2023 · 3 comments
Open

RuntimeError #59

sisyphus229 opened this issue May 7, 2023 · 3 comments

Comments

@sisyphus229
Copy link

Initializing BaseSegmenter to cuda:0
Traceback (most recent call last):
File "D:\pythonProject\Track-Anything-master\app.py", line 383, in
model = TrackingAnything(SAM_checkpoint, xmem_checkpoint, e2fgvi_checkpoint,args)
File "D:\pythonProject\Track-Anything-master\track_anything.py", line 18, in init
self.samcontroler = SamControler(self.sam_checkpoint, args.sam_model_type, args.device)
File "D:\pythonProject\Track-Anything-master\tools\interact_tools.py", line 37, in init
self.sam_controler = BaseSegmenter(SAM_checkpoint, model_type, device)
File "D:\pythonProject\Track-Anything-master\tools\base_segmenter.py", line 25, in init
self.model = sam_model_registrymodel_type
File "D:\anaconda\envs\my_pytorch\lib\site-packages\segment_anything\build_sam.py", line 15, in build_sam_vit_h
return _build_sam(
File "D:\anaconda\envs\my_pytorch\lib\site-packages\segment_anything\build_sam.py", line 105, in _build_sam
state_dict = torch.load(f)
File "D:\anaconda\envs\my_pytorch\lib\site-packages\torch\serialization.py", line 777, in load
with _open_zipfile_reader(opened_file) as opened_zipfile:
File "D:\anaconda\envs\my_pytorch\lib\site-packages\torch\serialization.py", line 282, in init
super(_open_zipfile_reader, self).init(torch._C.PyTorchFileReader(name_or_buffer))
RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory

进程已结束,退出代码1

What is this problem?

@gaomingqi
Copy link
Owner

Hello, it seems pre-trained weights for SAM are not downloaded completely. Please clear the cached files in checkpoints folder and try again. Thanks.

@sisyphus229
Copy link
Author

Hello, it seems pre-trained weights for SAM are not downloaded completely. Please clear the cached files in checkpoints folder and try again. Thanks.

yes, I just solved that problem, too. Thank you very much. And then I want to ask you how much memory i need to run the TAM, which always say is out of memory.

@gaomingqi
Copy link
Owner

Hello, please check our previous discussions for more details about memory: #4 (comment) (run TAM for tracking), #4 (comment) (run TAM for inpainting). Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants