Unable to Create Session (Protobuf Parsing Error)
Closed this issue · 5 comments
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!
Can you make a screenshot of Network tab in dev tools?
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)
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?

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):

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