Skip to content

block swap with no_grad context #1988

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: sd3
Choose a base branch
from
Draft

block swap with no_grad context #1988

wants to merge 2 commits into from

Conversation

kohya-ss
Copy link
Owner

Add with torch.no_grad() for block swap. Unfortunately block swapping doesn't work well with multi-GPU training, but it may solve the loss=NaN issue.

@rockerBOO
Copy link
Contributor

What are the issues with multi-GPU block swapping? Would we want to distribute blocks to different devices? Or is it library specific?

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.

2 participants