Skip to content

Commit 359b605

Browse files
tanuj-raigithub-actions[bot]a-r-r-o-w
authored
Update autoencoder_kl_cosmos.py (#12045)
* Update autoencoder_kl_cosmos.py * Apply style fixes --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Aryan <[email protected]>
1 parent 6febc08 commit 359b605

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/diffusers/models/autoencoders/autoencoder_kl_cosmos.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,9 @@ def _arrange(self, hidden_states: torch.Tensor) -> torch.Tensor:
168168
batch_size, num_channels, num_frames, height, width = hidden_states.shape
169169
p = self.patch_size
170170

171-
hidden_states = torch.reshape(batch_size, num_channels, num_frames // p, p, height // p, p, width // p, p)
171+
hidden_states = hidden_states.reshape(
172+
batch_size, num_channels, num_frames // p, p, height // p, p, width // p, p
173+
)
172174
hidden_states = hidden_states.permute(0, 1, 3, 5, 7, 2, 4, 6).flatten(1, 4).contiguous()
173175
return hidden_states
174176

0 commit comments

Comments
 (0)