Skip to content

Commit 24a743b

Browse files
committed
use unipc instead of flow match
1 parent 2f1f0cf commit 24a743b

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

src/diffusers/modular_pipelines/wan/before_denoise.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
import torch
1919

20-
from ...schedulers import FlowMatchEulerDiscreteScheduler
20+
from ...schedulers import UniPCMultistepScheduler
2121
from ...utils import logging
2222
from ...utils.torch_utils import randn_tensor
2323
from ..modular_pipeline import PipelineBlock, PipelineState
@@ -200,7 +200,7 @@ class WanSetTimestepsStep(PipelineBlock):
200200
@property
201201
def expected_components(self) -> List[ComponentSpec]:
202202
return [
203-
ComponentSpec("scheduler", FlowMatchEulerDiscreteScheduler),
203+
ComponentSpec("scheduler", UniPCMultistepScheduler),
204204
]
205205

206206
@property

src/diffusers/modular_pipelines/wan/denoise.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from ...configuration_utils import FrozenDict
2020
from ...guiders import ClassifierFreeGuidance
2121
from ...models import WanTransformer3DModel
22-
from ...schedulers import FlowMatchEulerDiscreteScheduler
22+
from ...schedulers import UniPCMultistepScheduler
2323
from ...utils import logging
2424
from ..modular_pipeline import (
2525
BlockState,
@@ -40,7 +40,7 @@ class WanLoopBeforeDenoiser(PipelineBlock):
4040
@property
4141
def expected_components(self) -> List[ComponentSpec]:
4242
return [
43-
ComponentSpec("scheduler", FlowMatchEulerDiscreteScheduler),
43+
ComponentSpec("scheduler", UniPCMultistepScheduler),
4444
]
4545

4646
@property
@@ -165,7 +165,7 @@ class WanLoopAfterDenoiser(PipelineBlock):
165165
@property
166166
def expected_components(self) -> List[ComponentSpec]:
167167
return [
168-
ComponentSpec("scheduler", FlowMatchEulerDiscreteScheduler),
168+
ComponentSpec("scheduler", UniPCMultistepScheduler),
169169
]
170170

171171
@property
@@ -227,7 +227,7 @@ def loop_expected_components(self) -> List[ComponentSpec]:
227227
config=FrozenDict({"guidance_scale": 5.0}),
228228
default_creation_method="from_config",
229229
),
230-
ComponentSpec("scheduler", FlowMatchEulerDiscreteScheduler),
230+
ComponentSpec("scheduler", UniPCMultistepScheduler),
231231
ComponentSpec("transformer", WanTransformer3DModel),
232232
]
233233

src/diffusers/modular_pipelines/wan/encoders.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ def check_inputs(block_state):
107107
):
108108
raise ValueError(f"`prompt` has to be of type `str` or `list` but is {type(block_state.prompt)}")
109109

110+
@staticmethod
110111
def _get_t5_prompt_embeds(
111112
components,
112113
prompt: Union[str, List[str]],

0 commit comments

Comments
 (0)