Closed AntiProSkills closed 1 year ago
Thank you for reporting this. You're correct, we're not making minified index files available for the non-default models.
Specific models are made available via files matching their names:
https://cdn.jsdelivr.net/npm/@upscalerjs/esrgan-medium@latest/dist/umd/2x.min.js
Where the name corresponds to the key in the exports field, which would be:
https://cdn.jsdelivr.net/npm/@upscalerjs/esrgan-medium@latest/dist/umd/2x.min.js
https://cdn.jsdelivr.net/npm/@upscalerjs/esrgan-medium@latest/dist/umd/3x.min.js
https://cdn.jsdelivr.net/npm/@upscalerjs/esrgan-medium@latest/dist/umd/4x.min.js
https://cdn.jsdelivr.net/npm/@upscalerjs/esrgan-medium@latest/dist/umd/8x.min.js
I think there's two action items for me here:
esrgan-medium
) available in the window scope via the index.min.js
file.Thank you for such a quick and thorough response!
Yes, the documentation you mentioned (on the model pages) is what I used to create my implementation. I appreciate you providing those URLs for me to use with the non-default models, as I was looking for a way to use the non-default models with the script tag imports. I think updating the documentation to reflect what you've said is a good idea.
If you run into any other issues, feel free to re-open this ticket
Bug Description When trying to import any upscaling model (except the default model) using script tags, the script that imports the model throws a 404 error in the webpage's console, and the model fails to import.
To Reproduce Below is HTML code that demonstrates the error. If you open the console when running it, you can see the 404 error.
Expected behavior The model should be successfully imported from the server, and the upscaled image should appear on the webpage.
Below is a working code snippet using the default-model, the only model which successfully imports using script tags.
Screenshots Below is a screenshot of the error message I got in the console.
Additional context It seems as if the source URL in the script that imports the model is broken or the file that was once there has moved. When you visit that URL in the browser, you get the message:
In contrast, when you try to do this with the source URL for the default-model, it seems to work properly. When you visit that URL in the browser, you get the code:
I'm not sure if that helps, but I thought I'd include it just in case.
Thank you in advance for your help.