Skip to content

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

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

Conversation

Bhavay-2001
Copy link
Contributor

@Bhavay-2001 Bhavay-2001 commented Jun 10, 2024

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

Who can review?

@sayakpaul

@Bhavay-2001
Copy link
Contributor Author

Hi @sayakpaul, could you pls review this?

@sayakpaul
Copy link
Member

@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.

@HuggingFaceDocBuilderDev

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.

@Bhavay-2001
Copy link
Contributor Author

Hi @sayakpaul, Please review this once.
Thanks

Copy link
Contributor

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 github-actions bot added the stale Issues that haven't received updates label Sep 14, 2024
@yiyixuxu yiyixuxu removed the stale Issues that haven't received updates label Dec 3, 2024
Copy link
Contributor

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 github-actions bot added the stale Issues that haven't received updates label Dec 27, 2024
@sayakpaul sayakpaul removed the stale Issues that haven't received updates label Apr 8, 2025
@sayakpaul
Copy link
Member

Failing test is unrelated.

@sayakpaul sayakpaul merged commit fbf61f4 into huggingface:main Apr 8, 2025
8 of 9 checks passed
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.

4 participants