ksugar / samapi

Segment Anything Model API
BSD 3-Clause "New" or "Revised" License
69 stars 12 forks source link

RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory #20

Closed greg-bioinfo closed 1 month ago

greg-bioinfo commented 1 month ago

Hi, When i try to launch the samapi servor i have this error: RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory Do you know why ? thank you

ksugar commented 1 month ago

Hi @greg-bioinfo, thank you for trying samapi.

As far as I investigated, the error usually indicates a problem with reading the PyTorch model file, often due to corruption or incomplete downloads.

Did the error message have a specific name of the file that has a problem?

Perhaps, you can try removing the ~/.samapi/ directory located under your home directory, and restarting the samapi server.

Please let me know if you need further help.

greg-bioinfo commented 1 month ago

Thank you a lot, I think the file was not downloaded correctly. But i have a new error now: image image It doesn't find the weights of thé modele

ksugar commented 1 month ago

Hi @greg-bioinfo, could you try adding the trailing slash to the server URL? The error should be fixed with this change.

http://localhost:8000/sam/
greg-bioinfo commented 1 month ago

It works thank you very much for the quick replies !