Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4b7fe04

Browse files
TianqiTang1117sayakpaul
andauthored
Fix typos and inconsistencies (#12204)
Fix typos and test assertions Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
1 parent 532f41c commit 4b7fe04

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

‎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)

AltStyle によって変換されたページ (->オリジナル) /