Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,8 @@ def forward_fn(
"""
noise_pred = self.transformer(
hidden_states=latent_input,
timestep=timestep / self.scheduler.config.num_train_timesteps,
timestep=timestep,
attention_timestep=timestep / self.scheduler.config.num_train_timesteps,
text_ids=extra_tensors["text_ids"],
text_mask=extra_tensors["text_mask"],
video_shape=video_shape,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,7 @@ def forward(
self,
hidden_states: torch.Tensor,
timestep: Optional[torch.Tensor] = None,
attention_timestep: Optional[torch.Tensor] = None,
text_ids: Optional[torch.Tensor] = None,
text_mask: Optional[torch.Tensor] = None,
video_shape: Optional[Tuple[int, int, int]] = None,
Expand All @@ -878,7 +879,9 @@ def forward(

Args:
hidden_states: [B, C, T, H, W] noisy latents
timestep: Normalized diffusion timestep in [0, 1], shape [B]
timestep: Raw scheduler diffusion timestep, shape [B]
attention_timestep: Normalized diffusion timestep in [0, 1], shape [B],
for attention backends that use timestep-dependent behavior.
text_ids: [B, S_text] tokenized text input
text_mask: [B, S_text] attention mask for text (1=real, 0=pad)
video_shape: (T, H, W) in latent space
Expand Down Expand Up @@ -931,7 +934,7 @@ def forward(
text_ids,
text_mask,
freqs_und,
timestep=timestep,
timestep=attention_timestep,
)
self.cached_freqs_gen = freqs_gen

Expand Down Expand Up @@ -971,7 +974,7 @@ def forward(
k_und,
v_und,
freqs_gen,
timestep=timestep,
timestep=attention_timestep,
)

hidden_gen = self.sharder.gather(hidden_gen, dim=1, unpad_to=S_gen)
Expand Down
Loading