[Model] feat: FastGen DMD2-distilled Wan 2.1 pipelines (T2V, I2V) (#2749)
Signed-off-by: ayushag <ayushag@nvidia.com>
This commit is contained in:
1 parent
71d81d475a
commit
dc8a9e2f17
17 files changed
+501
-38
No files matched your search
@@ -0,0 +1,23 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import torch
|
||||
from diffusers import FlowMatchEulerDiscreteScheduler
|
||||
|
||||
|
||||
class DMD2EulerScheduler(FlowMatchEulerDiscreteScheduler):
|
||||
"""Euler scheduler that always uses the fixed DMD2 training timestep schedule."""
|
||||
|
||||
def __init__(self, *args, dmd2_timesteps: list[int], **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self._dmd2_timesteps = dmd2_timesteps
|
||||
|
||||
def set_timesteps(
|
||||
self,
|
||||
num_inference_steps: int | None = None,
|
||||
device: str | torch.device | None = None,
|
||||
**kwargs,
|
||||
) -> None:
|
||||
super().set_timesteps(timesteps=self._dmd2_timesteps, device=device)
|
||||
Reference in new issue
Block a user