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
7b10e4ae
Unverified
Commit
7b10e4ae
authored
Aug 08, 2025
by
Sayak Paul
Committed by
GitHub
Aug 08, 2025
Browse files
[tests] device placement for non-denoiser components in group offloading LoRA tests (#12103)
up
parent
3c0531bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
tests/lora/utils.py
tests/lora/utils.py
+4
-1
No files found.
tests/lora/utils.py
View file @
7b10e4ae
...
...
@@ -2400,7 +2400,6 @@ class PeftLoraLoaderMixinTests:
components
,
_
,
_
=
self
.
get_dummy_components
(
self
.
scheduler_classes
[
0
])
pipe
=
self
.
pipeline_class
(
**
components
)
pipe
=
pipe
.
to
(
torch_device
)
pipe
.
set_progress_bar_config
(
disable
=
None
)
denoiser
=
pipe
.
transformer
if
self
.
unet_kwargs
is
None
else
pipe
.
unet
...
...
@@ -2416,6 +2415,10 @@ class PeftLoraLoaderMixinTests:
num_blocks_per_group
=
1
,
use_stream
=
use_stream
,
)
# Place other model-level components on `torch_device`.
for
_
,
component
in
pipe
.
components
.
items
():
if
isinstance
(
component
,
torch
.
nn
.
Module
):
component
.
to
(
torch_device
)
group_offload_hook_1
=
_get_top_level_group_offload_hook
(
denoiser
)
self
.
assertTrue
(
group_offload_hook_1
is
not
None
)
output_1
=
pipe
(
**
inputs
,
generator
=
torch
.
manual_seed
(
0
))[
0
]
...
...
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