Skip to content
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

Fixing implementation of ControlNet-XS #6772

Merged
merged 92 commits into from
Apr 16, 2024
Merged

Conversation

UmerHA
Copy link
Contributor

@UmerHA UmerHA commented Jan 30, 2024

What does this PR do?

Implements ControlNet-XS with the feedback from PR #5827 incorporated.

See original PR for details.

Who can review?

Core library:

@DN6
Copy link
Collaborator

DN6 commented Apr 8, 2024

Looking good overall 👍🏽 Left some comments.

Regarding the naming, we could perhaps call the module ControlNetXSAdapter? Since its behaviour is similar to our other adapters? cc: @yiyixuxu

- Importing ControlNetConditioningEmbedding now
- get_down/mid/up_block_addon now outside class
- renamed `do_control` to `apply_control`
For this, added `norm_num_groups` as parameter everywhere
@yiyixuxu
Copy link
Collaborator

yiyixuxu commented Apr 8, 2024

Regarding the naming, we could perhaps call the module ControlNetXSAdapter? Since its behaviour is similar to our other adapters?

ok!

- `ControlNetXSAddon` -> `ControlNetXSAdapter`
- `ControlNetXSAddonDownBlockComponents` -> `DownBlockControlNetXSAdapter`, and similarly for mid/up
- `get_mid_block_addon` -> `get_mid_block_adapter`, and similarly for mid/up
@UmerHA
Copy link
Contributor Author

UmerHA commented Apr 9, 2024

Regarding the naming, we could perhaps call the module ControlNetXSAdapter? Since its behaviour is similar to our other adapters?

ok!

Sounds good. Have renamed

  • ControlNetXSAddon -> ControlNetXSAdapter
  • ControlNetXSAddonDownBlockComponents -> DownBlockControlNetXSAdapter, and similarly for mid/up blocks
  • get_down_block_addon -> get_down_block_adapter, and similarly for mid/up

@yiyixuxu
Copy link
Collaborator

@UmerHA the failing tests look relevant here - can you look into and fix?

@UmerHA
Copy link
Contributor Author

UmerHA commented Apr 11, 2024

@yiyixuxu you were right - should be fixed now. can you rerun the tests?

@UmerHA
Copy link
Contributor Author

UmerHA commented Apr 15, 2024

The only failing test seems very unrelated to this PR:

CleanShot 2024-04-15 at 08 43 29@2x

cc @yiyixuxu

Copy link
Collaborator

@yiyixuxu yiyixuxu left a comment

Choose a reason for hiding this comment

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

thanks!

@UmerHA
Copy link
Contributor Author

UmerHA commented Apr 15, 2024

@DN6 some of your comments aren't marked as resolved. do you have any more questions/feedback, or is it fine as is?

@DN6 DN6 merged commit fda1531 into huggingface:main Apr 16, 2024
15 checks passed
@UmerHA UmerHA deleted the controlnetxs-2 branch April 16, 2024 16:27
@DN6
Copy link
Collaborator

DN6 commented Apr 16, 2024

@UmerHA All good. We can break up the tests in a follow up PR.

@DN6
Copy link
Collaborator

DN6 commented Apr 17, 2024

@UmerHA We have failing slow tests because the checkpoint doesn't seem to be updated. Can you take care of this please
Raised an issue: #7694

@UmerHA
Copy link
Contributor Author

UmerHA commented Apr 17, 2024

Have updated the models & ran the slow test on a T4 - works now.

XSE42 added a commit to XSE42/diffusers3d that referenced this pull request May 2, 2024
diffusers commit fda1531
    Fixing implementation of ControlNet-XS
    (huggingface/diffusers#6772)
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.

7 participants