Skip to content

Help users avoid CUDA errors when using oversized img2img inputs #23

@zeke

Description

@zeke

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions