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

Unable to Create Session (Protobuf Parsing Error) #2

Closed
jdp8 opened this issue Aug 16, 2023 · 5 comments
Closed

Unable to Create Session (Protobuf Parsing Error) #2

jdp8 opened this issue Aug 16, 2023 · 5 comments

Comments

@jdp8
Copy link
Contributor

jdp8 commented Aug 16, 2023

I've been trying to run this project locally but I keep getting the following error: "Error: Can't create a session. ERROR_CODE: 7, ERROR_MESSAGE: Failed to load model because protobuf parsing failed."

I cleared the site data as mentioned in the FAQ but this did not fix the issue. Is there anything else that is needed to fix this issue? Any assistance would be appreciated. Thank you!

@dakenf
Copy link
Owner

dakenf commented Aug 16, 2023

Can you make a screenshot of Network tab in dev tools?

@jdp8
Copy link
Contributor Author

jdp8 commented Aug 16, 2023

Sure! This is what appears after pressing 'LOAD MODEL'.

Screenshot 2023-08-16 at 4 51 51 PM

@dakenf
Copy link
Owner

dakenf commented Aug 16, 2023

I think i know where the problem is. Please download these model files https://huggingface.co/aislamov/stable-diffusion-2-1-base-onnx/tree/9f697c96d42e5c09437ff14b0a2b287366ce488d and put them to public\models\aislamov\stable-diffusion-2-1-base-onnx

This happens because create-react-app returns HTML page with 200 code instead of 404. And huggingface hub utils from transformers.js treat it as a correct model response

I will update the code to handle it in next few days (and also release new version of onnx runtime that takes ~2.2sec for one step instead of a minute)

@jdp8
Copy link
Contributor Author

jdp8 commented Aug 17, 2023

I tried your solution but it did not work until I switched to a previous commit (the SHA is 13cf369). After this I was able to download the model files from the public\models\aislamov\stable-diffusion-2-1-base-onnx directory. However when I pressed 'RUN' the canvas remained black. In other words, an image was never generated. Upon checking the 'Application' tab in dev tools I found that the tokenizer/merges.txt and tokenizer/vocab.json files were not downloaded properly. Maybe this could be another issue?

Screenshot 2023-08-17 at 6 08 50 PM

Also I tried to run your deployed project but it threw the following error which I assume was due to the commit you did a couple of days ago to the Hugging Face repo (I saw that the model weight files were added):

Screenshot 2023-08-17 at 6 17 50 PM

I will wait for your changes and test the project then. Thank you for your assistance!

@jdp8 jdp8 mentioned this issue Sep 11, 2023
11 tasks
@jdp8
Copy link
Contributor Author

jdp8 commented Sep 12, 2023

Closing this issue because I was able to run the project as expected after following the steps listed in the "Issues" section of this PR.

@jdp8 jdp8 closed this as completed Sep 12, 2023
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