Skip to content

Conversation

@dg845
Copy link
Collaborator

@dg845 dg845 commented Feb 5, 2024

What does this PR do?

This PR initializes the target_unet target model config from unet rather than teacher_unet in the LCM full model distillation scripts. This ensures that if we add a time_embedding.cond_proj to unet for the guidance scale embedding (because teacher_unet does not have it), target_unet is also properly initialized with a time_embedding.cond_proj.

Fixes #6790.

Before submitting

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.

@patrickvonplaten
@sayakpaul
@patil-suraj
@shadowofsoul

…correctly add time_embedding.cond_proj if necessary.
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2024

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

@github-actions github-actions bot added the stale Issues that haven't received updates label Mar 6, 2024
@sayakpaul
Copy link
Member

@patil-suraj gentle ping.

@github-actions github-actions bot removed the stale Issues that haven't received updates label Mar 7, 2024
@sayakpaul
Copy link
Member

@patil-suraj could you give this a look?

@HuggingFaceDocBuilderDev

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.

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

@github-actions github-actions bot added the stale Issues that haven't received updates label Apr 11, 2024
@yiyixuxu yiyixuxu merged commit 0bee4d3 into huggingface:main Apr 11, 2024
sayakpaul added a commit that referenced this pull request Dec 23, 2024
* Initialize target_unet from unet rather than teacher_unet so that we correctly add time_embedding.cond_proj if necessary.

* Use UNet2DConditionModel.from_config to initialize target_unet from unet's config.

---------

Co-authored-by: Sayak Paul <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale Issues that haven't received updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LCM example training fails Unexpected key(s) in state_dict: "time_embedding.cond_proj.weight"

4 participants