Skip to content

pytorch2.0 rocm torch.compile gives RuntimeWarning and generated black images #2758

@ttio2tech

Description

@ttio2tech

I was testing the https://huggingface.co/docs/diffusers/optimization/torch2.0 examples,
The normal 'Accelerated Transformers implementation' was successful.
But the torch.compile example:
pipe.unet = torch.compile(pipe.unet)
image = pipe(prompt).images[0]
gives warning:
pipelines/pipeline_utils.py:1023: RuntimeWarning: invalid value encountered in cast
images = (images * 255).round().astype("uint8")
Resulting in black images.

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleIssues that haven't received updates

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions