microsoft / OmniParser

A simple screen parsing tool towards pure vision based GUI agent
Creative Commons Attribution 4.0 International
4.67k stars 352 forks source link

No files matching the pattern were found #74

Open sby-a-izumi opened 1 week ago

sby-a-izumi commented 1 week ago

After setting up the environment by following the tutorial, I ran gradio_demo.py and encountered the following error:

> python .\gradio_demo.py

[2024-11-05 18:06:25,042] [ WARNING] easyocr.py:80 - Neither CUDA nor MPS are available - defaulting to CPU. Note: This module is much faster with a GPU.
Florence2LanguageForConditionalGeneration has generative capabilities, as `prepare_inputs_for_generation` is explicitly overwritten. However, it doesn't directly inherit from `GenerationMixin`. From 👉v4.50👈 onwards, `PreTrainedModel` will NOT inherit from `GenerationMixin`, and this model will lose the ability to call `generate` and other related functions.
  - If you're using `trust_remote_code=True`, you can get rid of this warning by loading the model with an auto class. See https://huggingface.co/docs/transformers/en/model_doc/auto#auto-classes
  - If you are the owner of the model architecture code, please modify your model class such that it inherits from `GenerationMixin` (after `PreTrainedModel`, otherwise you'll get an exception).
  - If you are not the owner of the model architecture class, please contact the model code owner to update it.
No files matching the pattern were found
* Running on local URL:  http://0.0.0.0:7861
2024/11/05 18:06:46 [W] [service.go:132] login to server failed: dial tcp <IP>:7000: i/o timeout

Could not create share link. Please check your internet connection or our status page: https://status.gradio.app.
AkimT13 commented 1 week ago

I believe I encountered a similar issue and it had something to do with the name of the files inside my weights folder, could you share a screenshot of your weights folder and the content inside its subfolders (icon_caption_blip2, icon_caption_florence,icon_detect)

yadong-lu commented 1 week ago

Hi @AkimT13, are you running on cpu or gpu machine?

AkimT13 commented 1 week ago

I switched everything to run on mps so it should be using my gpu. However in order to get it to run I had to change filename: pytorch_model-00001-of-00002.bin to be pytorch_model.bin inside the weights/icon_caption_blip2 folder. Theres still a file called pytorch_model-00002-of-00002.bin that is probably not getting used but it still runs fine anyway. Although it says this: "Some weights of Blip2ForConditionalGeneration were not initialized from the model checkpoint at weights/icon_caption_blip2 and are newly initialized because the shapes did not match: " and then a long list of torch's being initialized. Do you have any ideas on how to fix this? p.s I am very new to this kind of stuff :)

-Thanks, Akim