When the image input is supplied, the model attempts to create an output image of the same dimensions. Users should ideally be providing square images of smaller dimensions like 512x512, but if they use an arbitrary image like a photo they took on their phone, the dimensions will be way bigger and the model will run out of memory and crash with a CUDA error.
This is not a great experience, and it's totally unclear to the user what might have gone wrong.
Possible actions
In ascending order by effort:
- Update the description for the
image input to give users a warning
- Abort the prediction with an error if the image is too big, or not a square
- Automatically crop and resize the image
Related issues/PRs
cc @anotherjesse
When the
imageinput is supplied, the model attempts to create an output image of the same dimensions. Users should ideally be providing square images of smaller dimensions like 512x512, but if they use an arbitrary image like a photo they took on their phone, the dimensions will be way bigger and the model will run out of memory and crash with a CUDA error.This is not a great experience, and it's totally unclear to the user what might have gone wrong.
Possible actions
In ascending order by effort:
imageinput to give users a warningRelated issues/PRs
cc @anotherjesse