Skip to content

Commit 22f3273

Browse files
committed
update
1 parent 03b03a9 commit 22f3273

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

src/diffusers/modular_pipelines/wan/modular_blocks.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,21 @@
2828
logger = 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+
3146
class 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):
215230
AUTO_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

Comments
 (0)