2828logger = logging .get_logger (__name__ ) # pylint: disable=invalid-name
2929
3030
31+ class WanAutoImageEncoderStep (AutoPipelineBlocks ):
32+ block_classes = [WanImageEncoderStep ]
33+ block_names = ["image_encoder" ]
34+ block_trigger_inputs = ["image" ]
35+
36+ @property
37+ def description (self ):
38+ return (
39+ "Image encoder step that encodes the image inputs into a conditioning embedding.\n "
40+ + "This is an auto pipeline block that works for both first-frame and first-last-frame conditioning tasks.\n "
41+ + " - `WanImageEncoderStep` (image_encoder) is used when `image`, and possibly `last_image` is provided."
42+ + " - if `image` is not provided, this step will be skipped."
43+ )
44+
45+
3146class WanAutoVaeEncoderStep (AutoPipelineBlocks ):
3247 block_classes = [WanVaeEncoderStep ]
3348 block_names = ["img2vid" ]
@@ -39,7 +54,7 @@ def description(self):
3954 "Vae encoder step that encode the image inputs into their latent representations.\n "
4055 + "This is an auto pipeline block that works for both first-frame and first-last-frame conditioning tasks.\n "
4156 + " - `WanVaeEncoderStep` (img2vid) is used when `image`, and possibly `last_image` is provided."
42- + " - if `image` is provided, this step will be skipped."
57+ + " - if `image` is not provided, this step will be skipped."
4358 )
4459
4560
@@ -215,7 +230,7 @@ def description(self):
215230AUTO_BLOCKS = InsertableDict (
216231 [
217232 ("text_encoder" , WanTextEncoderStep ),
218- ("image_encoder" , WanImageEncoderStep ),
233+ ("image_encoder" , WanAutoImageEncoderStep ),
219234 ("vae_encoder" , WanAutoVaeEncoderStep ),
220235 ("before_denoise" , WanAutoBeforeDenoiseStep ),
221236 ("denoise" , WanAutoDenoiseStep ),
0 commit comments