Skip to content

Commit fd3a2b6

Browse files
committed
address review comments
1 parent bcc02e7 commit fd3a2b6

File tree

2 files changed

+7
-36
lines changed

2 files changed

+7
-36
lines changed

src/diffusers/modular_pipelines/wan/decoders.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131

3232
class WanDecodeStep(PipelineBlock):
33-
model_name = "stable-diffusion-xl"
33+
model_name = "wan"
3434

3535
@property
3636
def expected_components(self) -> List[ComponentSpec]:

src/diffusers/modular_pipelines/wan/denoise.py

Lines changed: 6 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -34,39 +34,6 @@
3434
logger = logging.get_logger(__name__) # pylint: disable=invalid-name
3535

3636

37-
class WanLoopBeforeDenoiser(PipelineBlock):
38-
model_name = "wan"
39-
40-
@property
41-
def expected_components(self) -> List[ComponentSpec]:
42-
return [
43-
ComponentSpec("scheduler", UniPCMultistepScheduler),
44-
]
45-
46-
@property
47-
def description(self) -> str:
48-
return (
49-
"step within the denoising loop that prepare the latent input for the denoiser. "
50-
"This block should be used to compose the `sub_blocks` attribute of a `LoopSequentialPipelineBlocks` "
51-
"object (e.g. `WanDenoiseLoopWrapper`)"
52-
)
53-
54-
@property
55-
def intermediate_inputs(self) -> List[str]:
56-
return [
57-
InputParam(
58-
"latents",
59-
required=True,
60-
type_hint=torch.Tensor,
61-
description="The initial latents to use for the denoising process. Can be generated in prepare_latent step.",
62-
),
63-
]
64-
65-
@torch.no_grad()
66-
def __call__(self, components: WanModularPipeline, block_state: BlockState, i: int, t: int):
67-
return components, block_state
68-
69-
7037
class WanLoopDenoiser(PipelineBlock):
7138
model_name = "wan"
7239

@@ -99,6 +66,12 @@ def inputs(self) -> List[Tuple[str, Any]]:
9966
@property
10067
def intermediate_inputs(self) -> List[str]:
10168
return [
69+
InputParam(
70+
"latents",
71+
required=True,
72+
type_hint=torch.Tensor,
73+
description="The initial latents to use for the denoising process. Can be generated in prepare_latent step.",
74+
),
10275
InputParam(
10376
"num_inference_steps",
10477
required=True,
@@ -271,7 +244,6 @@ def __call__(self, components: WanModularPipeline, state: PipelineState) -> Pipe
271244

272245
class WanDenoiseStep(WanDenoiseLoopWrapper):
273246
block_classes = [
274-
WanLoopBeforeDenoiser,
275247
WanLoopDenoiser,
276248
WanLoopAfterDenoiser,
277249
]
@@ -283,7 +255,6 @@ def description(self) -> str:
283255
"Denoise step that iteratively denoise the latents. \n"
284256
"Its loop logic is defined in `WanDenoiseLoopWrapper.__call__` method \n"
285257
"At each iteration, it runs blocks defined in `sub_blocks` sequencially:\n"
286-
" - `WanLoopBeforeDenoiser`\n"
287258
" - `WanLoopDenoiser`\n"
288259
" - `WanLoopAfterDenoiser`\n"
289260
"This block supports both text2vid tasks."

0 commit comments

Comments
 (0)