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

does not appear to have a file named pytorch_model.bin #10

Open
remore2022 opened this issue Dec 28, 2024 · 3 comments
Open

does not appear to have a file named pytorch_model.bin #10

remore2022 opened this issue Dec 28, 2024 · 3 comments

Comments

@remore2022
Copy link

Traceback (most recent call last):
File "E:\pinokio\api\RMBG-2-Studio.git\app\app.py", line 35, in
birefnet = AutoModelForImageSegmentation.from_pretrained(
File "E:\pinokio\api\RMBG-2-Studio.git\app\env\lib\site-packages\transformers\models\auto\auto_factory.py", line 559, in from_pretrained
return model_class.from_pretrained(
File "E:\pinokio\api\RMBG-2-Studio.git\app\env\lib\site-packages\transformers\modeling_utils.py", line 3929, in from_pretrained
raise EnvironmentError(
OSError: briaai/RMBG-2.0 does not appear to have a file named pytorch_model.bin, model.safetensors, tf_model.h5, model.ckpt or flax_model.msgpack.

(env) (base) E:\pinokio\api\RMBG-2-Studio.git\app>

@ai-anchorite
Copy link
Collaborator

ai-anchorite commented Dec 28, 2024

you can see them here: https://huggingface.co/briaai/RMBG-2.0/tree/main

a connection issue between you and huggingface i assume. maybe temporary congestion or something blocking - vpn, proxy, geolocation etc.

might be an old fashioned install fail as well. failing to install the transformers package.
best bet is to delete and reinstall. and watch the install spam for any connection problems.

@remore2022
Copy link
Author

Thanks for your reply!
I have upgraded to the latest version of pinokio and set up a global proxy,
but it still doesn't work.
An error occurred when downloading the pytorch_model.bin.
I have downloaded this file separately, but I don't know which directory I should put it in.

@ai-anchorite
Copy link
Collaborator

hmm it's a HF snapshot download, i.e. the 864MB model file looks like this in the file system:

..pinokio\api\RMBG-2-Studio3.git\cache\HF_HOME\hub\models--briaai--RMBG-2.0\blobs\566ed80c3d95f87ada6864d4cbe2290a1c5eb1c7bb0b123e984f60f76b02c3a7"

i actually have no idea how to easily insert a self downloaded model into that.
Claude or ChatGPT should be able to easily assist if you drag the app.py file into the chat and explain the problem.

the other thing to check will be why your system is blocking pinokio from downloading the file. Could be as simple as a firewall or similar security being upset that a 3rd party app is downloading from Huggingface.

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