Skip to content

Commit 54a4aea

Browse files
authored
Merge branch 'main' into remove-numpy
2 parents f0b7aba + 57b70c5 commit 54a4aea

File tree

9 files changed

+11
-13
lines changed

9 files changed

+11
-13
lines changed

setup.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@
9292
"jaxlib>=0.1.65,<=0.3.6",
9393
"modelcards>=0.1.4",
9494
"numpy",
95-
"onnxruntime",
9695
"onnxruntime-gpu",
9796
"pytest",
9897
"pytest-timeout",
@@ -179,7 +178,6 @@ def run(self):
179178
extras["training"] = deps_list("accelerate", "datasets", "tensorboard", "modelcards")
180179
extras["test"] = deps_list(
181180
"datasets",
182-
"onnxruntime",
183181
"onnxruntime-gpu",
184182
"pytest",
185183
"pytest-timeout",

src/diffusers/modeling_flax_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ def from_pretrained(
436436
)
437437
cls._missing_keys = missing_keys
438438

439-
# Mistmatched keys contains tuples key/shape1/shape2 of weights in the checkpoint that have a shape not
439+
# Mismatched keys contains tuples key/shape1/shape2 of weights in the checkpoint that have a shape not
440440
# matching the weights in the model.
441441
mismatched_keys = []
442442
for key in state.keys():

src/diffusers/pipeline_flax_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,8 @@ def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union[str, os.P
244244
245245
kwargs (remaining dictionary of keyword arguments, *optional*):
246246
Can be used to overwrite load - and saveable variables - *i.e.* the pipeline components - of the
247-
specific pipeline class. The overritten components are then directly passed to the pipelines `__init__`
248-
method. See example below for more information.
247+
specific pipeline class. The overwritten components are then directly passed to the pipelines
248+
`__init__` method. See example below for more information.
249249
250250
<Tip>
251251

src/diffusers/pipeline_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,8 @@ def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union[str, os.P
235235
236236
kwargs (remaining dictionary of keyword arguments, *optional*):
237237
Can be used to overwrite load - and saveable variables - *i.e.* the pipeline components - of the
238-
specific pipeline class. The overritten components are then directly passed to the pipelines `__init__`
239-
method. See example below for more information.
238+
specific pipeline class. The overwritten components are then directly passed to the pipelines
239+
`__init__` method. See example below for more information.
240240
241241
<Tip>
242242

src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class LDMTextToImagePipeline(DiffusionPipeline):
2727
vqvae ([`VQModel`]):
2828
Vector-quantized (VQ) Model to encode and decode images to and from latent representations.
2929
bert ([`LDMBertModel`]):
30-
Text-encoder model based on [BERT](ttps://huggingface.co/docs/transformers/model_doc/bert) architecture.
30+
Text-encoder model based on [BERT](https://huggingface.co/docs/transformers/model_doc/bert) architecture.
3131
tokenizer (`transformers.BertTokenizer`):
3232
Tokenizer of class
3333
[BertTokenizer](https://huggingface.co/docs/transformers/model_doc/bert#transformers.BertTokenizer).
@@ -396,7 +396,7 @@ def forward(
396396
attn_output = attn_output.transpose(1, 2)
397397

398398
# Use the `embed_dim` from the config (stored in the class) rather than `hidden_state` because `attn_output` can be
399-
# partitioned aross GPUs when using tensor-parallelism.
399+
# partitioned across GPUs when using tensor-parallelism.
400400
attn_output = attn_output.reshape(bsz, tgt_len, self.inner_dim)
401401

402402
attn_output = self.out_proj(attn_output)

src/diffusers/schedulers/scheduling_karras_ve.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def set_timesteps(self, num_inference_steps: int):
105105
self.timesteps = np.arange(0, self.num_inference_steps)[::-1].copy()
106106
schedule = [
107107
(
108-
self.config.sigma_max
108+
self.config.sigma_max**2
109109
* (self.config.sigma_min**2 / self.config.sigma_max**2) ** (i / (num_inference_steps - 1))
110110
)
111111
for i in self.timesteps

src/diffusers/schedulers/scheduling_karras_ve_flax.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def set_timesteps(self, state: KarrasVeSchedulerState, num_inference_steps: int)
113113
timesteps = jnp.arange(0, num_inference_steps)[::-1].copy()
114114
schedule = [
115115
(
116-
self.config.sigma_max
116+
self.config.sigma_max**2
117117
* (self.config.sigma_min**2 / self.config.sigma_max**2) ** (i / (num_inference_steps - 1))
118118
)
119119
for i in timesteps

src/diffusers/utils/logging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def reset_format() -> None:
266266

267267
def warning_advice(self, *args, **kwargs):
268268
"""
269-
This method is identical to `logger.warninging()`, but if env var DIFFUSERS_NO_ADVISORY_WARNINGS=1 is set, this
269+
This method is identical to `logger.warning()`, but if env var DIFFUSERS_NO_ADVISORY_WARNINGS=1 is set, this
270270
warning will not be printed
271271
"""
272272
no_advisory_warnings = os.getenv("DIFFUSERS_NO_ADVISORY_WARNINGS", False)

tests/test_pipelines.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1103,7 +1103,7 @@ def test_karras_ve_pipeline(self):
11031103

11041104
image_slice = image[0, -3:, -3:, -1]
11051105
assert image.shape == (1, 256, 256, 3)
1106-
expected_slice = np.array([0.26815, 0.1581, 0.2658, 0.23248, 0.1550, 0.2539, 0.1131, 0.1024, 0.0837])
1106+
expected_slice = np.array([0.578, 0.5811, 0.5924, 0.5809, 0.587, 0.5886, 0.5861, 0.5802, 0.586])
11071107
assert np.abs(image_slice.flatten() - expected_slice).max() < 1e-2
11081108

11091109
@slow

0 commit comments

Comments
 (0)