Skip to content

Commit 0b09231

Browse files
committed
update
1 parent 900fead commit 0b09231

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/diffusers/models/transformers/transformer_mochi.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,7 @@ def _get_positions(
373373
return positions
374374

375375
def _create_rope(self, freqs: torch.Tensor, pos: torch.Tensor) -> torch.Tensor:
376-
with torch.autocast("cuda", enabled=False):
377-
freqs = torch.einsum("nd,dhf->nhf", pos.to(freqs), freqs)
376+
freqs = torch.einsum("nd,dhf->nhf", pos.to(freqs), freqs)
378377
freqs_cos = torch.cos(freqs)
379378
freqs_sin = torch.sin(freqs)
380379
return freqs_cos, freqs_sin

src/diffusers/pipelines/mochi/pipeline_mochi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ def __init__(
210210
self.default_height = 480
211211
self.default_width = 848
212212

213-
# Adapted from diffusers.pipelines.cogvideo.pipeline_cogvideox.CogVideoXPipeline._get_t5_prompt_embeds
214213
def _get_t5_prompt_embeds(
215214
self,
216215
prompt: Union[str, List[str]] = None,
@@ -233,6 +232,7 @@ def _get_t5_prompt_embeds(
233232
add_special_tokens=True,
234233
return_tensors="pt",
235234
)
235+
236236
text_input_ids = text_inputs.input_ids
237237
prompt_attention_mask = text_inputs.attention_mask
238238
prompt_attention_mask = prompt_attention_mask.bool().to(device)

0 commit comments

Comments
 (0)