Skip to content

[chore] raise as early as possible in group offloading#11792

Merged
sayakpaul merged 2 commits into
mainfrom
raise-early-go
Jun 24, 2025
Merged

[chore] raise as early as possible in group offloading#11792
sayakpaul merged 2 commits into
mainfrom
raise-early-go

Conversation

@sayakpaul
Copy link
Copy Markdown
Member

No description provided.

@sayakpaul sayakpaul requested a review from a-r-r-o-w June 24, 2025 08:47
Comment thread src/diffusers/hooks/group_offloading.py Outdated
onload_self: bool = True,
offload_to_disk_path: Optional[str] = None,
) -> None:
if stream is None and record_stream:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We can remove this completely, no? It's not supposed to be user facing and now apply_group_offloading handles the error case too

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We can but since ModuleGroup is a public class I thought of keeping it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not really, it's not a public class - no user is expected to import it or that we document it that way. We don't necessarily need to mark every internal data structure private to imply it shouldn't be used by users

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Removed.

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@sayakpaul sayakpaul merged commit 7392c8f into main Jun 24, 2025
16 checks passed
Sign up for free to 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.

3 participants