camenduru / grounded-segment-anything-colab

Grounding DINO with Segment Anything & Stable Diffusion colab
The Unlicense
191 stars 17 forks source link

No such file or directory: '/home/ecs-user/download/sam_vit_h_4b8939.pth' #1

Closed jessemoe closed 1 year ago

jessemoe commented 1 year ago

Model loaded from /root/.cache/huggingface/hub/models--ShilongLiu--GroundingDINO/snapshots/6fb3434d67548d71747b1ab3a32051d27a30c71f/groundingdino_swint_ogc.pth => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight']) /usr/local/lib/python3.9/dist-packages/transformers/modeling_utils.py:830: FutureWarning: The device argument is deprecated and will be removed in v5 of Transformers. warnings.warn( /usr/local/lib/python3.9/dist-packages/torch/utils/checkpoint.py:31: UserWarning: None of the inputs have requires_grad=True. Gradients will be None warnings.warn("None of the inputs have requires_grad=True. Gradients will be None") Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/gradio/routes.py", line 393, in run_predict output = await app.get_blocks().process_api( File "/usr/local/lib/python3.9/dist-packages/gradio/blocks.py", line 1108, in process_api result = await self.call_function( File "/usr/local/lib/python3.9/dist-packages/gradio/blocks.py", line 915, in call_function prediction = await anyio.to_thread.run_sync( File "/usr/local/lib/python3.9/dist-packages/anyio/to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/usr/local/lib/python3.9/dist-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "/usr/local/lib/python3.9/dist-packages/anyio/_backends/_asyncio.py", line 867, in run result = context.run(func, *args) File "/content/Grounded-Segment-Anything/gradio_app.py", line 193, in run_grounded_sam predictor = SamPredictor(build_sam(checkpoint=sam_checkpoint)) File "/usr/local/lib/python3.9/dist-packages/segment_anything/build_sam.py", line 15, in build_sam_vit_h return _build_sam( File "/usr/local/lib/python3.9/dist-packages/segment_anything/build_sam.py", line 104, in _build_sam with open(checkpoint, "rb") as f: FileNotFoundError: [Errno 2] No such file or directory: '/home/ecs-user/download/sam_vit_h_4b8939.pth'

camenduru commented 1 year ago

Hi @stark-eth 👋 thanks ❤ maybe fixed please try again