Skip to content

Commit ca70f08

Browse files
committed
update
1 parent 80ccc90 commit ca70f08

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/diffusers/models/transformers/transformer_mochi.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@ def __init__(
269269
time_embed_dim: int = 256,
270270
activation_fn: str = "swiglu",
271271
max_sequence_length: int = 256,
272+
sample_height: int = 60,
273+
sample_width: int = 106,
272274
) -> None:
273275
super().__init__()
274276

src/diffusers/pipelines/mochi/pipeline_mochi.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,6 @@ def __init__(
207207
self.tokenizer_max_length = (
208208
self.tokenizer.model_max_length if hasattr(self, "tokenizer") and self.tokenizer is not None else 77
209209
)
210-
self.default_height = 480
211-
self.default_width = 848
212210

213211
# Adapted from diffusers.pipelines.cogvideo.pipeline_cogvideox.CogVideoXPipeline._get_t5_prompt_embeds
214212
def _get_t5_prompt_embeds(
@@ -577,8 +575,8 @@ def __call__(
577575
if isinstance(callback_on_step_end, (PipelineCallback, MultiPipelineCallbacks)):
578576
callback_on_step_end_tensor_inputs = callback_on_step_end.tensor_inputs
579577

580-
height = height or self.default_height
581-
width = width or self.default_width
578+
height = height or self.transformer.config.sample_height * self.vae_spatial_scale_factor
579+
width = width or self.transformer.config.sample_width * self.vae_spatial_scale_factor
582580

583581
# 1. Check inputs. Raise error if not correct
584582
self.check_inputs(

0 commit comments

Comments
 (0)