Skip to content

should use 'permute' replace 'transpose' #10953

@nku-shengzheliu

Description

@nku-shengzheliu

Describe the bug

images = torch.from_numpy(images.transpose(0, 3, 1, 2))

TypeError: transpose() received an invalid combination of arguments - got (int, int, int, int), but expected one of:

  • (int dim0, int dim1)
  • (name dim0, name dim1)

should use 'permute' replace 'transpose'

Reproduction

import torch

x = torch.randn(2,3,4,5)
x.transpose(0, 3, 1, 2)

Logs

System Info

diffusers 0.27.0
torch 2.0.1

Who can help?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions