File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed 
docs/source/en/api/pipelines Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,24 @@ pipe = WanPipeline.from_pretrained("Wan-AI/Wan2.1-T2V-1.3B-Diffusers", scheduler
4545pipe.scheduler =  < CUSTOM_SCHEDULER_HERE > 
4646``` 
4747
48+ ### Using single file loading with Wan  
49+ 
50+ The ` WanTransformer3DModel `  and ` AutoencoderKLWan `  models support loading checkpoints in their original format via the ` from_single_file `  loading 
51+ method. 
52+ 
53+ 
54+ ``` python 
55+ import  torch
56+ from  diffusers import  WanPipeline, WanTransformer3DModel
57+ 
58+ ckpt_path =  " https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/blob/main/split_files/diffusion_models/wan2.1_t2v_1.3B_bf16.safetensors" 
59+ transformer =  WanTransformer3DModel.from_single_file(ckpt_path, torch_dtype = torch.bfloat16)
60+ 
61+ pipe =  WanPipeline.from_pretrained(" Wan-AI/Wan2.1-T2V-1.3B-Diffusers" transformer = transformer)
62+ ``` 
63+ ``` 
64+ ``` 
65+ 
4866## WanPipeline  
4967
5068[[ autodoc]]  WanPipeline
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments