Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
renzhc
diffusers_dcu
Commits
48305755
Unverified
Commit
48305755
authored
Oct 20, 2025
by
Dhruv Nair
Committed by
GitHub
Oct 20, 2025
Browse files
Raise warning instead of error when imports are missing for custom code (#12513)
update
parent
7853bfbe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/diffusers/utils/dynamic_modules_utils.py
src/diffusers/utils/dynamic_modules_utils.py
+2
-2
No files found.
src/diffusers/utils/dynamic_modules_utils.py
View file @
48305755
...
@@ -151,8 +151,8 @@ def check_imports(filename):
...
@@ -151,8 +151,8 @@ def check_imports(filename):
missing_packages
.
append
(
imp
)
missing_packages
.
append
(
imp
)
if
len
(
missing_packages
)
>
0
:
if
len
(
missing_packages
)
>
0
:
raise
ImportError
(
logger
.
warning
(
"This modeling file require
s
the following packages that were not found in your environment: "
"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
)
}
`"
f
"
{
', '
.
join
(
missing_packages
)
}
. Run `pip install
{
' '
.
join
(
missing_packages
)
}
`"
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment