File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 (
You can’t perform that action at this time.
0 commit comments