Summary
The built-in extension_huggingface_cache_manager extension fails to load when huggingface_hub >= 1.0 is installed, because it imports a private path that was removed in HF Hub 1.0.
requirements.txt does not pin huggingface_hub, so a fresh install (e.g. via Docker) pulls in 1.13.0 transitively and the tab is broken out-of-the-box.
Stacktrace
Loading Huggingface Cache Manager.............Failed to load Huggingface Cache Manager tab. Please check your configuration.
Error: No module named 'huggingface_hub.commands'
Traceback (most recent call last):
File "/app/tts-webui/tts_webui/extensions_loader/interface_extensions.py", line 134, in _handle_package
module = importlib.import_module(f"{package_name}.main")
...
File "/app/tts-webui/extensions/builtin/extension_huggingface_cache_manager/scan_cache.py", line 27, in <module>
from huggingface_hub.commands._cli_utils import ANSI, tabulate
ModuleNotFoundError: No module named 'huggingface_hub.commands'
Root cause
extensions/builtin/extension_huggingface_cache_manager/scan_cache.py:27 imports a private submodule:
from huggingface_hub.commands._cli_utils import ANSI, tabulate
huggingface_hub.commands was reorganized in huggingface_hub 1.0 — the commands package (and its private _cli_utils) is no longer present. Latest is 1.13.0.
Reproduction
- Fresh install of tts-webui main branch (any environment that resolves
huggingface_hub from PyPI without an explicit pin).
- Start the server.
- Observe the cache manager tab fails to load with the traceback above.
The rest of the app loads fine — only this one extension is affected.
Environment
- OS: Ubuntu 22.04 (Docker container,
nvidia/cuda:12.8.0-devel-ubuntu22.04)
- Python: 3.10
- huggingface_hub: 1.13.0 (latest)
- tts-webui: main
Possible fixes
- Update the import to whatever the new path is in HF Hub 1.x (e.g. under
huggingface_hub.cli if equivalents were moved there), with a fallback for older versions.
- Vendor the
ANSI and tabulate helpers — they're tiny utilities and depending on a private path was always brittle.
- Stopgap: add
huggingface_hub<1.0 to requirements.txt until the import is updated.
Summary
The built-in
extension_huggingface_cache_managerextension fails to load whenhuggingface_hub >= 1.0is installed, because it imports a private path that was removed in HF Hub 1.0.requirements.txtdoes not pinhuggingface_hub, so a fresh install (e.g. via Docker) pulls in1.13.0transitively and the tab is broken out-of-the-box.Stacktrace
Root cause
extensions/builtin/extension_huggingface_cache_manager/scan_cache.py:27imports a private submodule:huggingface_hub.commandswas reorganized inhuggingface_hub 1.0— thecommandspackage (and its private_cli_utils) is no longer present. Latest is1.13.0.Reproduction
huggingface_hubfrom PyPI without an explicit pin).The rest of the app loads fine — only this one extension is affected.
Environment
nvidia/cuda:12.8.0-devel-ubuntu22.04)Possible fixes
huggingface_hub.cliif equivalents were moved there), with a fallback for older versions.ANSIandtabulatehelpers — they're tiny utilities and depending on a private path was always brittle.huggingface_hub<1.0torequirements.txtuntil the import is updated.