diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

[train_controlnet.py] Fix the LR schedulers when num_train_epochs is passed in a distributed training env

Open Bhavay-2001 opened this issue 1 year ago • 4 comments

What does this PR do?

Part of #8384

Test script

export MODEL_DIR="runwayml/stable-diffusion-v1-5"
export OUTPUT_DIR="controlnet_output"

accelerate launch train_controlnet.py \
 --pretrained_model_name_or_path=$MODEL_DIR \
 --output_dir=$OUTPUT_DIR \
 --dataset_name=fusing/fill50k \
 --resolution=512 \
 --num_train_epochs=100 \
 --learning_rate=1e-5 \
 --validation_image "./conditioning_image_1.png" "./conditioning_image_2.png" \
 --validation_prompt "red circle with blue background" "cyan circle with brown floral background" \
 --train_batch_size=4

Before submitting

  • [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • [x] Did you read the contributor guideline?
  • [ ] Did you read our philosophy doc (important for complex PRs)?
  • [x] Was this discussed/approved via a GitHub issue or the forum? Please add a link to it if that's the case.
  • [ ] Did you make sure to update the documentation with your changes? Here are the documentation guidelines, and here are tips on formatting docstrings.
  • [ ] Did you write any new necessary tests?

Who can review?

@sayakpaul

Bhavay-2001 avatar Jun 10 '24 15:06 Bhavay-2001

Hi @sayakpaul, could you pls review this?

Bhavay-2001 avatar Jun 12 '24 05:06 Bhavay-2001

@Bhavay-2001 when you are working on parts of issues like #8384, please don't write "Fixes ..." in your PRs because your PR doesn't fully fix the issue. It's a part of the solution, rather.

sayakpaul avatar Jun 24 '24 08:06 sayakpaul

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.

Hi @sayakpaul, Please review this once. Thanks

Bhavay-2001 avatar Jun 26 '24 07:06 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 Sep 14 '24 15:09 github-actions[bot]

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 Dec 27 '24 15:12 github-actions[bot]

Failing test is unrelated.

sayakpaul avatar Apr 08 '25 06:04 sayakpaul