Uh oh!
There was an error while loading. Please reload this page.
support sd3.5 for controlnet example - #9860
Conversation
DavyMorgan
commented
Nov 4, 2024
@sayakpaul Hi, in this PR, I add sd3.5 to the controlnet example, with only a few lines added! |
HuggingFaceDocBuilderDev
commented
Nov 4, 2024
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. |
yiyixuxu
commented
Nov 4, 2024
@DavyMorgan can you fix the test? |
Yeah, I have updated the test. |
yiyixuxu
commented
Nov 8, 2024
@DavyMorgan |
DavyMorgan
commented
Nov 15, 2024
Sure, I can fix that. |
DavyMorgan
commented
Nov 17, 2024
@yiyixuxu@sayakpaul Could you please run the test workflows again? |
DavyMorgan
commented
Nov 17, 2024
@sayakpaul I updated the codes. This time it should be ok. :) |
sayakpaul
left a comment
There was a problem hiding this comment.
Thanks for the changes!
Could you provide some example results as well?
Additionally, I hosted the tiny pipe to our testing org:
https://huggingface.co/hf-internal-testing/tiny-sd35-pipe
Could you please change the path accordingly in test_controlnet.py?
I will let @yiyixuxu review the other changes introduced.
| else: | ||
| logger.info("Initializing controlnet weights from transformer") | ||
| controlnet = SD3ControlNetModel.from_transformer(transformer) | ||
| controlnet = SD3ControlNetModel.from_transformer(transformer, num_extra_conditioning_channels=0) |
There was a problem hiding this comment.
Should this be hard-coded like this? Can we use a CLI arg?
There was a problem hiding this comment.
Thanks, I have added a CLI arg.
DavyMorgan
commented
Nov 17, 2024
@sayakpaul I have updated the codes to use hf-internal-testing/tiny-sd35-pipe. Meanwhile, the example results can be found at the end of examples/controlnet/README_sd3.md. |
| # controlnet residual | ||
| if block_controlnet_hidden_states is not None and block.context_pre_only is False: | ||
| interval_control = len(self.transformer_blocks) // len(block_controlnet_hidden_states) | ||
| interval_control = int(math.ceil(len(self.transformer_blocks) / len(block_controlnet_hidden_states))) |
There was a problem hiding this comment.
sorry I missed this change - any reason we make this change here?
yiyixuxu
commented
Nov 20, 2024
related ( a little bit overlap with) #9758 |
DavyMorgan
commented
Nov 27, 2024
@yiyixuxu@sayakpaul Can you run the tests again to check whether it works well with the current HEAD? |
sayakpaul
commented
Nov 28, 2024
@DavyMorgan sorry for the late reply. Could you consider the changes introduced in #9758 and repurpose this PR accordingly? |
| pooled_projection_dim: int = 2048, | ||
| out_channels: int = 16, | ||
| pos_embed_max_size: int = 96, | ||
| dual_attention_layers: Tuple[ |
There was a problem hiding this comment.
we already have this change
can you rebase?
DavyMorgan
commented
Dec 5, 2024
@yiyixuxu@sayakpaul Hi, I have fixed the codes to pass the quality test. Please run the tests again! |
Sorry for missing the typo😂Now fixed. @yiyixuxu@sayakpaul |
* support sd3.5 in controlnet --------- Co-authored-by: YiYi Xu <yixu310@gmail.com>
What does this PR do?
Fixes # (issue)
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.