@@ -79,7 +79,7 @@ def __init__(
7979 ):
8080 deprecate (
8181 "tensor_format" ,
82- "0.5 .0" ,
82+ "0.6 .0" ,
8383 "If you're running your code in PyTorch, you can safely remove this argument." ,
8484 take_from = kwargs ,
8585 )
@@ -156,18 +156,13 @@ def get_adjacent_sigma(self, timesteps, t):
156156 self .discrete_sigmas [timesteps - 1 ].to (timesteps .device ),
157157 )
158158
159- def set_seed (self , seed ):
160- deprecate ("set_seed" , "0.5.0" , "Please consider passing a generator instead." )
161- torch .manual_seed (seed )
162-
163159 def step_pred (
164160 self ,
165161 model_output : torch .FloatTensor ,
166162 timestep : int ,
167163 sample : torch .FloatTensor ,
168164 generator : Optional [torch .Generator ] = None ,
169165 return_dict : bool = True ,
170- ** kwargs ,
171166 ) -> Union [SdeVeOutput , Tuple ]:
172167 """
173168 Predict the sample at the previous timestep by reversing the SDE. Core function to propagate the diffusion
@@ -186,9 +181,6 @@ def step_pred(
186181 `return_dict` is True, otherwise a `tuple`. When returning a tuple, the first element is the sample tensor.
187182
188183 """
189- if "seed" in kwargs and kwargs ["seed" ] is not None :
190- self .set_seed (kwargs ["seed" ])
191-
192184 if self .timesteps is None :
193185 raise ValueError (
194186 "`self.timesteps` is not set, you need to run 'set_timesteps' after creating the scheduler"
@@ -231,7 +223,6 @@ def step_correct(
231223 sample : torch .FloatTensor ,
232224 generator : Optional [torch .Generator ] = None ,
233225 return_dict : bool = True ,
234- ** kwargs ,
235226 ) -> Union [SchedulerOutput , Tuple ]:
236227 """
237228 Correct the predicted sample based on the output model_output of the network. This is often run repeatedly
@@ -249,9 +240,6 @@ def step_correct(
249240 `return_dict` is True, otherwise a `tuple`. When returning a tuple, the first element is the sample tensor.
250241
251242 """
252- if "seed" in kwargs and kwargs ["seed" ] is not None :
253- self .set_seed (kwargs ["seed" ])
254-
255243 if self .timesteps is None :
256244 raise ValueError (
257245 "`self.timesteps` is not set, you need to run 'set_timesteps' after creating the scheduler"
0 commit comments