Skip to content

NaN problem for fp16 UNet #4

@ur-licht

Description

@ur-licht

Awesome work!
When I tried to run the code, I found that UNet sometimes output NaNs, and I found that this only happens when model dtype is fp16. To avoid this problem, simply use .convert_to_fp32() method of the UNet model.

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