huggingface / huggingface/diffusers
Bugs in PixArtImageProcessor.resize_and_crop_tensor
- Lingua principale
- Python
- Stelle
- 34.5k
- Fork
- 7.3k
- Merge medio
- 3g 3h
- PR unite (30g)
- 91
Descrizione
### Describe the bug
`PixArtImageProcessor.resize_and_crop_tensor` returns image with incorrect size
### Reproduction
```python
import torch
from diffusers.image_processor import PixArtImageProcessor
orig_height, orig_width = (832, 1152)
new_height, new_width = (960, 1280)
image = torch.rand((1, 3, orig_height, orig_width))
image = PixArtImageProcessor.resize_and_crop_tensor(image, new_width, new_height)
print(image.size())
# expected: torch.Size([1, 3, 960, 1280])
# actual: torch.Size([1, 3, 1, 1280])
```
### Logs
_No response_
### System Info
diffusers==0.30.0.dev0
### Who can help?
_No response_
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.