
    +h{              	       \   S SK Jr  SSKJrJr  SSKJr  SSKJrJ	r	J
r
  SSKJr  SSKJr  SS	KJr  \R"                  " \5      r " S
 S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r\" S\4S\4S\
4S\	4S\4S\4/5      r\" S\4S\4S\4S\4/5      r\\S.rg)   )logging   )AutoPipelineBlocksSequentialPipelineBlocks)InsertableDict   )WanInputStepWanPrepareLatentsStepWanSetTimestepsStep)WanDecodeStep)WanDenoiseStep)WanTextEncoderStepc                   6    \ rS rSr\\\/r/ SQr\	S 5       r
Srg)WanBeforeDenoiseStep    )inputset_timestepsprepare_latentsc                      g)Na  Before denoise step that prepare the inputs for the denoise step.
This is a sequential pipeline blocks:
 - `WanInputStep` is used to adjust the batch size of the model inputs
 - `WanSetTimestepsStep` is used to set the timesteps
 - `WanPrepareLatentsStep` is used to prepare the latents
 selfs    h/home/james-whalen/.local/lib/python3.13/site-packages/diffusers/modular_pipelines/wan/modular_blocks.pydescription WanBeforeDenoiseStep.description(   s    L	
    r   N)__name__
__module____qualname____firstlineno__r	   r   r
   block_classesblock_namespropertyr   __static_attributes__r   r   r   r   r       s,    M
 @K
 
r   r   c                   6    \ rS rSr\/rS/rS/r\S 5       r	Sr
g)WanAutoBeforeDenoiseStep4   text2vidNc                      g)NzBefore denoise step that prepare the inputs for the denoise step.
This is an auto pipeline block that works for text2vid.
 - `WanBeforeDenoiseStep` (text2vid) is used.
r   r   s    r   r   $WanAutoBeforeDenoiseStep.description;       @	
r   r   )r   r   r   r    r   r!   r"   block_trigger_inputsr#   r   r$   r   r   r   r&   r&   4   s/    M ,K 6
 
r   r&   c                   >    \ rS rSr\/rS/rS/r\S\	4S j5       r
Srg)WanAutoDenoiseStepE   denoiseNreturnc                      g)NzDenoise step that iteratively denoise the latents. This is a auto pipeline block that works for text2vid tasks.. - `WanDenoiseStep` (denoise) for text2vid tasks.r   r   s    r   r   WanAutoDenoiseStep.descriptionL   r+   r   r   )r   r   r   r    r   r!   r"   r,   r#   strr   r$   r   r   r   r.   r.   E   s6    M +K 6
S 
 
r   r.   c                   6    \ rS rSr\/rS/rS/r\S 5       r	Sr
g)WanAutoDecodeStepV   znon-inpaintNc                     g)NzTDecode step that decode the denoised latents into videos outputs.
 - `WanDecodeStep`r   r   s    r   r   WanAutoDecodeStep.description[   s    fr   r   )r   r   r   r    r   r!   r"   r,   r#   r   r$   r   r   r   r6   r6   V   s,    "OM /K 6g gr   r6   c                   8    \ rS rSr\\\\/r/ SQr	\
S 5       rSrg)WanAutoBlocksa   )text_encoderbefore_denoiser0   decoderc                      g)NzvAuto Modular pipeline for text-to-video using Wan.
- for text-to-video generation, all you need to provide is `prompt`r   r   s    r   r   WanAutoBlocks.descriptiono   s    T	
r   r   N)r   r   r   r    r   r&   r.   r6   r!   r"   r#   r   r$   r   r   r   r;   r;   a   s0     	MK 
 
r   r;   r=   r   r   r   r0   decoder>   )
text2videoautoN)utilsr   modular_pipeliner   r   modular_pipeline_utilsr   r>   r	   r
   r   decodersr   r0   r   encodersr   
get_loggerr   loggerr   r&   r.   r6   r;   TEXT2VIDEO_BLOCKSAUTO_BLOCKS
ALL_BLOCKSr   r   r   <module>rO      s    K 3 
 $ # ( 
		H	%
3 
(
1 
"
+ 
"g* g
, 
, #	+,	,	-.	12	N#	=!	  	+,	34	&'	$%	 $
r   