-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Ldm unet convert fix #6038
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
Ldm unet convert fix #6038
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. |
paths, checkpoint, old_checkpoint, attention_paths_to_split=None, additional_replacements=None, config=None | ||
paths, | ||
checkpoint, | ||
old_checkpoint, | ||
attention_paths_to_split=None, | ||
additional_replacements=None, | ||
config=None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you remove the comma at the end, I think the formatting will be gone here. And we get to keep the LoC as is.
checkpoint, | ||
config, | ||
path=None, | ||
extract_ema=False, | ||
controlnet=False, | ||
skip_extract_state_dict=False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
meta_path = { | ||
"old": f"input_blocks.{i}.0", | ||
"new": f"down_blocks.{block_id}.resnets.{layer_in_block_id}", | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same.
paths, | ||
new_checkpoint, | ||
unet_state_dict, | ||
additional_replacements=[meta_path], | ||
config=config, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same.
meta_path = { | ||
"old": f"input_blocks.{i}.1", | ||
"new": f"down_blocks.{block_id}.attentions.{layer_in_block_id}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same.
paths, new_checkpoint, unet_state_dict, additional_replacements=[meta_path], config=config | ||
paths, | ||
new_checkpoint, | ||
unet_state_dict, | ||
additional_replacements=[meta_path], | ||
config=config, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I think the formatting related changes could be reverted.
@DN6 there seems to be something off with your linter as it's always changing every file that is adapted no? |
@patrickvonplaten I fixed it. Think this branch was created before I applied the fix. Will resolve now |
* fix * fix ldm conversion * fix linting
* fix * fix ldm conversion * fix linting
* fix * fix ldm conversion * fix linting
What does this PR do?
Fixes # (issue)
#5917
Before submitting
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.