Skip to content

Commit 0828f50

Browse files
authored
Merge branch 'main' into add-trtquant-backend
2 parents cf054d2 + 552c127 commit 0828f50

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

docs/source/en/using-diffusers/other-formats.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ Benefits of using the Diffusers-multifolder layout include:
176176
).to("cuda")
177177
turbo_pipeline.scheduler = EulerDiscreteScheduler.from_config(
178178
turbo_pipeline.scheduler.config,
179-
timestep+spacing="trailing"
179+
timestep_spacing="trailing"
180180
)
181181
image = turbo_pipeline(
182182
"an astronaut riding a unicorn on mars",
@@ -267,6 +267,7 @@ pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_d
267267
save_folder = "flux-dev"
268268
pipe.save_pretrained("flux-dev")
269269
export_folder_as_dduf("flux-dev.dduf", folder_path=save_folder)
270+
```
270271

271272
> [!TIP]
272273
> Packaging and loading quantized checkpoints in the DDUF format is supported as long as they respect the multi-folder structure.

docs/source/en/using-diffusers/text-img2vid.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ export_to_video(output, "output.mp4", fps=16)
287287

288288
## Reduce memory usage
289289

290-
Recent video models like [`HunyuanVideoPipeline`] and [`WanPipeline`], which have 10B+ parameters, require a lot of memory and it often exceeds the memory availabe on consumer hardware. Diffusers offers several techniques for reducing the memory requirements of these large models.
290+
Recent video models like [`HunyuanVideoPipeline`] and [`WanPipeline`], which have 10B+ parameters, require a lot of memory and it often exceeds the memory available on consumer hardware. Diffusers offers several techniques for reducing the memory requirements of these large models.
291291

292292
> [!TIP]
293293
> Refer to the [Reduce memory usage](../optimization/memory) guide for more details about other memory saving techniques.

src/diffusers/utils/import_utils.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,11 @@ def _is_package_available(pkg_name: str, get_dist_name: bool = False) -> Tuple[b
7070
# Fallback for Python < 3.10
7171
for dist in importlib_metadata.distributions():
7272
_top_level_declared = (dist.read_text("top_level.txt") or "").split()
73-
_infered_opt_names = {
73+
# Infer top-level package names from file structure
74+
_inferred_opt_names = {
7475
f.parts[0] if len(f.parts) > 1 else inspect.getmodulename(f) for f in (dist.files or [])
7576
} - {None}
76-
_top_level_inferred = filter(lambda name: "." not in name, _infered_opt_names)
77+
_top_level_inferred = filter(lambda name: "." not in name, _inferred_opt_names)
7778
for pkg in _top_level_declared or _top_level_inferred:
7879
_package_map[pkg].append(dist.metadata["Name"])
7980
except Exception as _:
@@ -119,7 +120,7 @@ def _is_package_available(pkg_name: str, get_dist_name: bool = False) -> Tuple[b
119120
_safetensors_available, _safetensors_version = _is_package_available("safetensors")
120121

121122
else:
122-
logger.info("Disabling Safetensors because USE_TF is set")
123+
logger.info("Disabling Safetensors because USE_SAFETENSORS is set")
123124
_safetensors_available = False
124125

125126
_onnxruntime_version = "N/A"

tests/hooks/test_hooks.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ def test_inference(self):
219219

220220
self.assertAlmostEqual(output1, output2, places=5)
221221
self.assertAlmostEqual(output1, output3, places=5)
222+
self.assertAlmostEqual(output2, output3, places=5)
222223

223224
def test_skip_layer_hook(self):
224225
registry = HookRegistry.check_if_exists_or_initialize(self.model)

0 commit comments

Comments
 (0)