"...text-generation-inference.git" did not exist on "3b56d7669ba3b98ae36cbc67904d95c6278e3b05"
Unverified Commit 4b7fe044 authored by Tianqi Tang's avatar Tianqi Tang Committed by GitHub
Browse files

Fix typos and inconsistencies (#12204)



Fix typos and test assertions
Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
parent 532f41c9
......@@ -287,7 +287,7 @@ export_to_video(output, "output.mp4", fps=16)
## Reduce memory usage
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.
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.
> [!TIP]
> Refer to the [Reduce memory usage](../optimization/memory) guide for more details about other memory saving techniques.
......
......@@ -70,10 +70,11 @@ def _is_package_available(pkg_name: str, get_dist_name: bool = False) -> Tuple[b
# Fallback for Python < 3.10
for dist in importlib_metadata.distributions():
_top_level_declared = (dist.read_text("top_level.txt") or "").split()
_infered_opt_names = {
# Infer top-level package names from file structure
_inferred_opt_names = {
f.parts[0] if len(f.parts) > 1 else inspect.getmodulename(f) for f in (dist.files or [])
} - {None}
_top_level_inferred = filter(lambda name: "." not in name, _infered_opt_names)
_top_level_inferred = filter(lambda name: "." not in name, _inferred_opt_names)
for pkg in _top_level_declared or _top_level_inferred:
_package_map[pkg].append(dist.metadata["Name"])
except Exception as _:
......@@ -119,7 +120,7 @@ if USE_SAFETENSORS in ENV_VARS_TRUE_AND_AUTO_VALUES:
_safetensors_available, _safetensors_version = _is_package_available("safetensors")
else:
logger.info("Disabling Safetensors because USE_TF is set")
logger.info("Disabling Safetensors because USE_SAFETENSORS is set")
_safetensors_available = False
_onnxruntime_version = "N/A"
......
......@@ -219,6 +219,7 @@ class HookTests(unittest.TestCase):
self.assertAlmostEqual(output1, output2, places=5)
self.assertAlmostEqual(output1, output3, places=5)
self.assertAlmostEqual(output2, output3, places=5)
def test_skip_layer_hook(self):
registry = HookRegistry.check_if_exists_or_initialize(self.model)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment