Skip to content

Fix group-offloading bug - #13211

Merged
sayakpaul merged 4 commits into
huggingface:mainfrom
SHYuanBest:main
Mar 4, 2026
Merged

Fix group-offloading bug#13211
sayakpaul merged 4 commits into
huggingface:mainfrom
SHYuanBest:main

Conversation

@SHYuanBest

Copy link
Copy Markdown
Contributor

Related to #13208 and #13210

cc @yiyixuxu
cc @sayakpaul
cc @dg845

Add fallback synchronous onload for conditionally-executed modules.
@SHYuanBestSHYuanBest changed the title Fix group-offload bugFix group-offloading bugMar 4, 2026
@sayakpaul
sayakpaul requested a review from DN6March 4, 2026 13:33
@sayakpaul

Copy link
Copy Markdown
Member

Could we also add a test for this code path in https://github.com/huggingface/diffusers/blob/main/tests/hooks/test_group_offloading.py?

@SHYuanBest

Copy link
Copy Markdown
ContributorAuthor

Could we also add a test for this code path in https://github.com/huggingface/diffusers/blob/main/tests/hooks/test_group_offloading.py?

done.

@sayakpaulsayakpaul left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! A few small comments. I also ran the tests on my end and they are passing.

Comment threadtests/hooks/test_group_offloading.py
Comment threadtests/hooks/test_group_offloading.py Outdated
Comment threadtests/hooks/test_group_offloading.py Outdated
@sayakpaul
sayakpaul merged commit 06ccde9 into huggingface:mainMar 4, 2026
10 of 11 checks passed
terarachang pushed a commit to terarachang/diffusers that referenced this pull request Apr 30, 2026
* Implement synchronous onload for offloaded parameters
Add fallback synchronous onload for conditionally-executed modules.
* add test for new code path about group-offloading
* Update tests/hooks/test_group_offloading.py
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
* use unittest.skipIf and update the comment
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@SHYuanBest@sayakpaul