1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

Raise warning instead of error when imports are missing for custom code (#12513)

update
This commit is contained in:
Dhruv Nair
2025-10-20 22:32:23 +05:30
committed by GitHub
parent 7853bfbed7
commit 48305755bf

View File

@@ -151,8 +151,8 @@ def check_imports(filename):
missing_packages.append(imp)
if len(missing_packages) > 0:
raise ImportError(
"This modeling file requires the following packages that were not found in your environment: "
logger.warning(
"This modeling file might require the following packages that were not found in your environment: "
f"{', '.join(missing_packages)}. Run `pip install {' '.join(missing_packages)}`"
)