Open-Sora icon indicating copy to clipboard operation
Open-Sora copied to clipboard

fix bug at mha, MaskGenerator; improve ckpt_utils.py

Open flymin opened this issue 1 year ago • 1 comments

  1. fix bug in mha when mask=None.
  2. fix bug in MaskGenerator. If the video is short, any type of mask has chances to mask all.
  3. use logger in load_checkpoint.

flymin avatar Jul 16 '24 03:07 flymin

Regarding 1, another solution is to change

q = self.q_linear(x).view(1, -1, self.num_heads, self.head_dim)

to

q = self.q_linear(x).view(B, -1, self.num_heads, self.head_dim)

if mask is None. Current implementation on the main branch assumes mask is never to be None.

flymin avatar Jul 16 '24 03:07 flymin