Skip to content

Support for PyTorch 2.1 torch.export To Load / Save Compiled Stable Diffusion Models  #5074

@djj0s3

Description

@djj0s3

Diffusers supports PyTorch 2.0's torch.compile which yields significant performance gains. However, the torch2.0 implementation did not include support for saving and loading the compiled result, which unfortunately limits its use in some environments. An example would be a production environment where new GPUs need to spin up to meet demand but require a "warm" up with compilation happening each time. With the new PyTorch 2.1 support, we should be able to save the compilation once and load it dynamically. PyTorch2.1 is now in RC so seems like a good time for this to be officially supported by Diffusers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleIssues that haven't received updates

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions