diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

[Tracker] use the new model card utilities for saving model cards from the training script

Open sayakpaul opened this issue 4 months ago • 22 comments

With https://github.com/huggingface/diffusers/pull/6729, we shifted to a more resilient and robust way to generate model cards from the DreamBooth training scripts.

So, we're keen for the community to help us do this for the other training scripts that save model cards:

While creating PRs, please also supply a notebook that generates the model card for a respective example. An example is available here: https://github.com/huggingface/diffusers/pull/6729#issue-2103496495. Use https://github.com/huggingface/diffusers/pull/6729 as a reference (only refer to the changes made in the training scripts). Please also target ONLY ONE example at a time in your PRs.

Please also tag me for a review when you open the PRs.

sayakpaul avatar Feb 07 '24 09:02 sayakpaul

All yours!

sayakpaul avatar Feb 07 '24 09:02 sayakpaul

Hi @sayakpaul, I checked #6729 and attempted to run your test notebook (https://huggingface.co/sayakpaul/test-model-card-template-dreambooth/blob/main/test_dreambooth_model_card.ipynb). However, it appears to not work for #6729 as it uses the instance_prompt keyword arguments in load_or_create_model_card. Changing it to prompt seems to fix the issue. My question is about the maintenance of these notebooks. Is it ok to create a notebook just to verify that my PR is working at the time?

bamps53 avatar Feb 07 '24 15:02 bamps53

Oh, it seems not only notebooks, but also training scripts in examples are not workings now. I made PR #6895 to fix these before this issue.

bamps53 avatar Feb 07 '24 15:02 bamps53

Hi @sayakpaul, I would love to work on this issue. I read the #6729 and based on my understanding what we have to do is -

  1. We need to add a training script for these models where we append the changes you mentioned in #6729. Basically all those changes that you made to this file examples/dreambooth/train_dreambooth_lora.py
  2. We need to use your notebook and generate model_cards for different models as well right?

Bhavay-2001 avatar Feb 07 '24 18:02 Bhavay-2001

If this is the case then I would be happy to work on ControlNet and ControlNetSDXL.

Bhavay-2001 avatar Feb 07 '24 18:02 Bhavay-2001

@bamps53 I have fixed the example notebook to clear the errors. So, that should be fine. Have reviewed your PR: https://github.com/huggingface/diffusers/pull/6895 as well. It looks solid.

I have also updated the description of this issue, clearly mentioning that contributors should open one PR at a time, targeting only one example. Hope that helps.

sayakpaul avatar Feb 08 '24 03:02 sayakpaul

@Bhavay-2001 I don't think you need to add any training script. We need to make use of the utilities (as shown in my example notebook and also in the PR) to create the model cards of the examples I have listed in the description. Is it more clear?

sayakpaul avatar Feb 08 '24 03:02 sayakpaul

@sayakpaul Thanks, I got it! I'll split the PR for each.

bamps53 avatar Feb 08 '24 03:02 bamps53

Sorry for the mess, but I created 3 PRs for each controlnet training scripts! #6908 #6909 #6910

By the way it was more tadious to create notebooks than modifying code itself... Any better way?

bamps53 avatar Feb 08 '24 14:02 bamps53

I think you misunderstood the description. The PR should target the actual training scripts. I asked for a notebook example to be able to quickly verify if the changes lead to expected README. The notebook can be a part of the PR description but not a part of the PR changes. If you check the reference PR, this is exactly what I have done.

Not sure how I can convey this more thoroughly.

sayakpaul avatar Feb 08 '24 14:02 sayakpaul

Yes, I believe I understand that. I didn't include the notebook in the PR. Just attached it to the description of each PR.

bamps53 avatar Feb 08 '24 15:02 bamps53

Hello @sayakpaul, I would love to work on all the T2I ones. Thank you!

cosmo3769 avatar Feb 10 '24 09:02 cosmo3769

Yes, feel free to!

sayakpaul avatar Feb 10 '24 14:02 sayakpaul

hi @sayakpaul could I claim Advanced Diffusion Training and Advanced Diffusion SDXL?

chiral-carbon avatar Feb 12 '24 19:02 chiral-carbon

I'll take Textual Inversion SDXL if it's available!

Stepheni12 avatar Feb 12 '24 22:02 Stepheni12

@chiral-carbon, @Stepheni12 feel free to proceed :)

sayakpaul avatar Feb 13 '24 03:02 sayakpaul

Hi @sayakpaul, I have also some pending PRs from a previous issue #6585. Can you please check them as well?

Bhavay-2001 avatar Feb 16 '24 16:02 Bhavay-2001

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[bot] avatar Mar 12 '24 15:03 github-actions[bot]

Hi sorry, I’m going to push a PR by the end of the week and was delayed due to some heavy backlog in my work, sorry about it.

chiral-carbon avatar Mar 12 '24 15:03 chiral-carbon

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[bot] avatar Apr 06 '24 15:04 github-actions[bot]

Hi @sayakpaul sorry for the delay! I have opened 2 new PRs for the tasks I had picked up.

chiral-carbon avatar Apr 09 '24 17:04 chiral-carbon

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[bot] avatar May 04 '24 15:05 github-actions[bot]