ai-forever / ai-forever/Kandinsky-2
Unable to use `batch_size`>1 in inpainting mode
- Dominant language
- Jupyter Notebook
- Stars
- 2.8k
- Forks
- 319
- PR merge metrics
- No merged PRs in 30d
Description
The title pretty much speaks for itself. Calling `.generate_inpainting(...)` with `batch_size` higher than `1` throws an error.
Log:
```
[/usr/local/lib/python3.9/dist-packages/kandinsky2/model/text2im_model2_1.py](https://localhost:8080/#) in forward(self, x, timesteps, inpaint_image, inpaint_mask, **kwargs)
150 inpaint_mask = torch.zeros_like(x[:, :1])
151 return super().forward(
--> 152 torch.cat([x, inpaint_image * inpaint_mask, inpaint_mask], dim=1),
153 timesteps,
154 **kwargs,
RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 4 but got size 2 for tensor number 1 in the list.```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.