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
bbd0c161
Unverified
Commit
bbd0c161
authored
Apr 18, 2025
by
Marc Sun
Committed by
GitHub
Apr 18, 2025
Browse files
[BNB] Fix test_moving_to_cpu_throws_warning (#11356)
fix Co-authored-by:
Sayak Paul
<
spsayakpaul@gmail.com
>
parent
eef3d659
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
src/diffusers/pipelines/pipeline_utils.py
src/diffusers/pipelines/pipeline_utils.py
+5
-0
No files found.
src/diffusers/pipelines/pipeline_utils.py
View file @
bbd0c161
...
@@ -404,6 +404,11 @@ class DiffusionPipeline(ConfigMixin, PushToHubMixin):
...
@@ -404,6 +404,11 @@ class DiffusionPipeline(ConfigMixin, PushToHubMixin):
if
not
is_accelerate_available
()
or
is_accelerate_version
(
"<"
,
"0.14.0"
):
if
not
is_accelerate_available
()
or
is_accelerate_version
(
"<"
,
"0.14.0"
):
return
False
return
False
_
,
_
,
is_loaded_in_8bit_bnb
=
_check_bnb_status
(
module
)
if
is_loaded_in_8bit_bnb
:
return
False
return
hasattr
(
module
,
"_hf_hook"
)
and
(
return
hasattr
(
module
,
"_hf_hook"
)
and
(
isinstance
(
module
.
_hf_hook
,
accelerate
.
hooks
.
AlignDevicesHook
)
isinstance
(
module
.
_hf_hook
,
accelerate
.
hooks
.
AlignDevicesHook
)
or
hasattr
(
module
.
_hf_hook
,
"hooks"
)
or
hasattr
(
module
.
_hf_hook
,
"hooks"
)
...
...
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