-
Notifications
You must be signed in to change notification settings - Fork 18
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
Cannot read property 'nInputPlane' of undefined #5
Comments
It looks like the server returned an incorrect file size. I haven't encountered this problem yet. Do you have any ideas on this issue. I just guessed that fetch did not get the correct file length |
Since I'm using Github pages it would be a bug on Github's part if that was the problem. I'm not sure if that's the case. I doubled checked with curl and the returned gzipped size seems to be correct.
This is the correct value according to RFC2616. It appears to me that the ReadableStream in https://github.com/samundrak/fetch-progress/blob/86663472ac11ead82a6b2cfd62f5465161df02aa/index.js#L23 |
I created an issue upstream but I'm not sure if that library is being maintained anymore. |
In this case, maybe I should judge the end of fetch directly instead of judging that the download is complete based on the progress. |
Yeah I think that will work. Just awaiting the _modelFetchPromise unconditionally should fix the issue I think. |
Thanks. I‘ll try to fix it later. |
[x] bug report
[ ] feature request
[ ] question about the decisions made in the repository
[ ] question about how to use this project
The error happens in the line bellow:
waifu2x-tfjs/src/lib/predictor.ts
Line 116 in 2a31b37
Investigating it appears the issue is happening because of some weird behavior of the
fetch-progress
library and the condition bellow:waifu2x-tfjs/src/lib/predictor.ts
Line 151 in 2a31b37
Adding a log to the
onProgress
callback I'm seeing that the model is still being downloaded even afterthis._modelFetchProgress > 1
.So basically,
predict
being called whenthis._modelFetchProgress >= 0.999999
but the model is still being fetched results in the error above.Adicional info:
The text was updated successfully, but these errors were encountered: