Skip to content

Commit 08c79cb

Browse files
committed
fix: align sigmas device in UniPCMultistepScheduler.set_timesteps
1 parent dc8d903 commit 08c79cb

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/diffusers/schedulers/scheduling_unipc_multistep.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,8 @@ def set_timesteps(
478478
# add an index counter for schedulers that allow duplicated timesteps
479479
self._step_index = None
480480
self._begin_index = None
481-
self.sigmas = self.sigmas.to("cpu") # to avoid too much CPU/GPU communication
481+
# self.sigmas = self.sigmas.to("cpu") # to avoid too much CPU/GPU communication
482+
self.sigmas = self.sigmas.to(device=device)
482483

483484
# Copied from diffusers.schedulers.scheduling_flow_match_euler_discrete.FlowMatchEulerDiscreteScheduler.time_shift
484485
def time_shift(self, mu: float, sigma: float, t: torch.Tensor):

0 commit comments

Comments
 (0)