Skip to content

Commit 09970fe

Browse files
committed
Sharding across height
1 parent ac8f984 commit 09970fe

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/maxdiffusion/models/wan/autoencoder_kl_wan.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ def __call__(self, x: jax.Array, cache_x: Optional[jax.Array] = None, idx=-1) ->
137137
if self.mesh is not None:
138138
# (B, D, H, W, C)
139139
if x_padded.shape[0] % self.mesh.shape['data'] == 0:
140-
x_padded = with_sharding_constraint(x_padded, PartitionSpec('data', None, None, 'fsdp', None))
140+
x_padded = with_sharding_constraint(x_padded, PartitionSpec('data', None, 'fsdp', None, None))
141141
else:
142-
x_padded = with_sharding_constraint(x_padded, PartitionSpec(None, None, None, 'fsdp', None))
142+
x_padded = with_sharding_constraint(x_padded, PartitionSpec(None, None, 'fsdp', None, None))
143143

144144
out = self.conv(x_padded)
145145
return out

0 commit comments

Comments
 (0)