Skip to content

add: controlnet entry to training section in the docs. #2677

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

Merged
merged 5 commits into from
Mar 21, 2023

Conversation

sayakpaul
Copy link
Member

Because we should.

@sayakpaul sayakpaul requested review from yiyixuxu and stevhliu March 15, 2023 04:40
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Mar 15, 2023

The documentation is not available anymore as the PR was closed or merged.

Copy link
Contributor

@patrickvonplaten patrickvonplaten left a comment

Choose a reason for hiding this comment

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

Thanks that looks nice to me! Going forward once we've added doc testing we should maybe think a bit about how we can test such training pages.

This PR is nice - it mirrors what has been done for dreambooth: https://huggingface.co/docs/diffusers/training/dreambooth

@yiyixuxu @stevhliu could you also take a look here?

Copy link
Member

@stevhliu stevhliu left a comment

Choose a reason for hiding this comment

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

Super cool! I love that you included examples from the training after 300 and 600 steps. I think this is really reassuring for users who're following along, and they can compare their outputs to these. 👏

-->

# ControlNet

Copy link
Member

Choose a reason for hiding this comment

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

It'd be nice to give a short intro (2-3 sentences) describing what ControlNet is.

Copy link
Member Author

@sayakpaul sayakpaul Mar 16, 2023

Choose a reason for hiding this comment

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

I think we can do that for all the training examples we have in a bulk PR.


[Adding Conditional Control to Text-to-Image Diffusion Models](https://arxiv.org/abs/2302.05543) (ControlNet) by Lvmin Zhang and Maneesh Agrawala.

This example is based on the [training example in the original ControlNet repository](https://github.com/lllyasviel/ControlNet/blob/main/docs/train.md). It trains a ControlNet to fill circles using a [small synthetic dataset](https://huggingface.co/datasets/fusing/fill50k).
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
This example is based on the [training example in the original ControlNet repository](https://github.com/lllyasviel/ControlNet/blob/main/docs/train.md). It trains a ControlNet to fill circles using a [small synthetic dataset](https://huggingface.co/datasets/fusing/fill50k).
This guide will show you how to train ControlNet to fill in circles using the [`fill50k`](https://huggingface.co/datasets/fusing/fill50k) dataset. It is based on the [training example](https://github.com/lllyasviel/ControlNet/blob/main/docs/train.md) in the original ControlNet repository.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it's not actually a guide, though. We are just showing how to use the example script and not discussing the training methodology (for which the script is there).

Copy link
Member

Choose a reason for hiding this comment

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

I think this is the same thing even if you aren't discussing the training methodology. By showing how to do something, you're still guiding the user. I'm fine with either way though :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah I see your point!

How about we merge it as is for now and then maybe you could open a PR updating all the examples to have a short intro section?

@mishig25 is working on #2718 which would make it simpler to keep the doc of the training section in sync with our READMEs. WDYT?

@sayakpaul
Copy link
Member Author

Going forward once we've added doc testing we should maybe think a bit about how we can test such training pages.

@patrickvonplaten Since the examples are already tested and the training pages are just mirrored copies of those examples, I think it's fine no?

@sayakpaul sayakpaul requested a review from stevhliu March 16, 2023 03:20
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.

this is awesome!

@patrickvonplaten
Copy link
Contributor

Going forward once we've added doc testing we should maybe think a bit about how we can test such training pages.

@patrickvonplaten Since the examples are already tested and the training pages are just mirrored copies of those examples, I think it's fine no?

Yes, it's just that we need to ideally find an automated way of keeping those doc pages in sync with the examples

@sayakpaul
Copy link
Member Author

sayakpaul commented Mar 16, 2023

Yes, it's just that we need to ideally find an automated way of keeping those doc pages in sync with the examples

You mean mirroring the content of example script READMEs in our docs?

Copy link
Member

@stevhliu stevhliu left a comment

Choose a reason for hiding this comment

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

Looks great to me, thanks for all the changes! 👍


[Adding Conditional Control to Text-to-Image Diffusion Models](https://arxiv.org/abs/2302.05543) (ControlNet) by Lvmin Zhang and Maneesh Agrawala.

This example is based on the [training example in the original ControlNet repository](https://github.com/lllyasviel/ControlNet/blob/main/docs/train.md). It trains a ControlNet to fill circles using a [small synthetic dataset](https://huggingface.co/datasets/fusing/fill50k).
Copy link
Member

Choose a reason for hiding this comment

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

I think this is the same thing even if you aren't discussing the training methodology. By showing how to do something, you're still guiding the user. I'm fine with either way though :)

@sayakpaul sayakpaul merged commit 73bdad0 into main Mar 21, 2023
@sayakpaul sayakpaul deleted the docs/training-overview branch March 21, 2023 01:53
w4ffl35 pushed a commit to w4ffl35/diffusers that referenced this pull request Apr 14, 2023
)

* add: controlnet entry to training section in the docs.

* formatting.

* Apply suggestions from code review

Co-authored-by: Steven Liu <[email protected]>

* wrap in a tip block.

---------

Co-authored-by: Steven Liu <[email protected]>
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
)

* add: controlnet entry to training section in the docs.

* formatting.

* Apply suggestions from code review

Co-authored-by: Steven Liu <[email protected]>

* wrap in a tip block.

---------

Co-authored-by: Steven Liu <[email protected]>
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.

5 participants