File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed 
src/diffusers/pipelines/wan Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ class WanPipeline(DiffusionPipeline, WanLoraLoaderMixin):
125125
126126    model_cpu_offload_seq  =  "text_encoder->transformer->transformer_2->vae" 
127127    _callback_tensor_inputs  =  ["latents" , "prompt_embeds" , "negative_prompt_embeds" ]
128-     _optional_components  =  ["transformer_2" ]
128+     _optional_components  =  ["transformer"  ,  " transformer_2"
129129
130130    def  __init__ (
131131        self ,
@@ -536,7 +536,11 @@ def __call__(
536536        timesteps  =  self .scheduler .timesteps 
537537
538538        # 5. Prepare latent variables 
539-         num_channels_latents  =  self .transformer .config .in_channels  if  self .transformer  is  not None  else  self .transformer_2 .config .in_channels 
539+         num_channels_latents  =  (
540+             self .transformer .config .in_channels 
541+             if  self .transformer  is  not None 
542+             else  self .transformer_2 .config .in_channels 
543+         )
540544        latents  =  self .prepare_latents (
541545            batch_size  *  num_videos_per_prompt ,
542546            num_channels_latents ,
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments