Skip to content

Commit b4a439b

Browse files
patrickvonplatenPrathik Rao
authored andcommitted
Bump to v0.5.0dev0
1 parent 0caaadc commit b4a439b

File tree

11 files changed

+14
-36
lines changed

11 files changed

+14
-36
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def run(self):
211211

212212
setup(
213213
name="diffusers",
214-
version="0.4.1", # expected format is one of x.y.z.dev0, or x.y.z.rc1 or x.y.z (no to dashes, yes to dots)
214+
version="0.5.0.dev0", # expected format is one of x.y.z.dev0, or x.y.z.rc1 or x.y.z (no to dashes, yes to dots)
215215
description="Diffusers",
216216
long_description=open("README.md", "r", encoding="utf-8").read(),
217217
long_description_content_type="text/markdown",

src/diffusers/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
)
1010

1111

12-
__version__ = "0.4.1"
12+
__version__ = "0.5.0.dev0"
1313

1414
from .configuration_utils import ConfigMixin
1515
from .onnx_utils import OnnxRuntimeModel

src/diffusers/schedulers/scheduling_ddim.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def __init__(
123123
):
124124
deprecate(
125125
"tensor_format",
126-
"0.5.0",
126+
"0.6.0",
127127
"If you're running your code in PyTorch, you can safely remove this argument.",
128128
take_from=kwargs,
129129
)
@@ -192,7 +192,7 @@ def set_timesteps(self, num_inference_steps: int, device: Union[str, torch.devic
192192
the number of diffusion steps used when generating samples with a pre-trained model.
193193
"""
194194
deprecated_offset = deprecate(
195-
"offset", "0.5.0", "Please pass `steps_offset` to `__init__` instead.", take_from=kwargs
195+
"offset", "0.7.0", "Please pass `steps_offset` to `__init__` instead.", take_from=kwargs
196196
)
197197
offset = deprecated_offset or self.config.steps_offset
198198

src/diffusers/schedulers/scheduling_ddpm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def __init__(
116116
):
117117
deprecate(
118118
"tensor_format",
119-
"0.5.0",
119+
"0.6.0",
120120
"If you're running your code in PyTorch, you can safely remove this argument.",
121121
take_from=kwargs,
122122
)

src/diffusers/schedulers/scheduling_karras_ve.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def __init__(
9090
):
9191
deprecate(
9292
"tensor_format",
93-
"0.5.0",
93+
"0.6.0",
9494
"If you're running your code in PyTorch, you can safely remove this argument.",
9595
take_from=kwargs,
9696
)

src/diffusers/schedulers/scheduling_lms_discrete.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def __init__(
7878
):
7979
deprecate(
8080
"tensor_format",
81-
"0.5.0",
81+
"0.6.0",
8282
"If you're running your code in PyTorch, you can safely remove this argument.",
8383
take_from=kwargs,
8484
)
@@ -217,7 +217,7 @@ def step(
217217
):
218218
deprecate(
219219
"timestep as an index",
220-
"0.5.0",
220+
"0.7.0",
221221
"Passing integer indices (e.g. from `enumerate(timesteps)`) as timesteps to"
222222
" `LMSDiscreteScheduler.step()` will not be supported in future versions. Make sure to pass"
223223
" one of the `scheduler.timesteps` as a timestep.",
@@ -263,7 +263,7 @@ def add_noise(
263263
if isinstance(timesteps, torch.IntTensor) or isinstance(timesteps, torch.LongTensor):
264264
deprecate(
265265
"timesteps as indices",
266-
"0.5.0",
266+
"0.7.0",
267267
"Passing integer indices (e.g. from `enumerate(timesteps)`) as timesteps to"
268268
" `LMSDiscreteScheduler.add_noise()` will not be supported in future versions. Make sure to"
269269
" pass values from `scheduler.timesteps` as timesteps.",

src/diffusers/schedulers/scheduling_pndm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def __init__(
104104
):
105105
deprecate(
106106
"tensor_format",
107-
"0.5.0",
107+
"0.6.0",
108108
"If you're running your code in PyTorch, you can safely remove this argument.",
109109
take_from=kwargs,
110110
)
@@ -159,7 +159,7 @@ def set_timesteps(self, num_inference_steps: int, device: Union[str, torch.devic
159159
the number of diffusion steps used when generating samples with a pre-trained model.
160160
"""
161161
deprecated_offset = deprecate(
162-
"offset", "0.5.0", "Please pass `steps_offset` to `__init__` instead.", take_from=kwargs
162+
"offset", "0.7.0", "Please pass `steps_offset` to `__init__` instead.", take_from=kwargs
163163
)
164164
offset = deprecated_offset or self.config.steps_offset
165165

src/diffusers/schedulers/scheduling_sde_ve.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -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"

src/diffusers/schedulers/scheduling_sde_vp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class ScoreSdeVpScheduler(SchedulerMixin, ConfigMixin):
4343
def __init__(self, num_train_timesteps=2000, beta_min=0.1, beta_max=20, sampling_eps=1e-3, **kwargs):
4444
deprecate(
4545
"tensor_format",
46-
"0.5.0",
46+
"0.6.0",
4747
"If you're running your code in PyTorch, you can safely remove this argument.",
4848
take_from=kwargs,
4949
)

src/diffusers/schedulers/scheduling_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class SchedulerMixin:
4545
def set_format(self, tensor_format="pt"):
4646
deprecate(
4747
"set_format",
48-
"0.5.0",
48+
"0.6.0",
4949
"If you're running your code in PyTorch, you can safely remove this function as the schedulers are always"
5050
" in Pytorch",
5151
)

0 commit comments

Comments
 (0)