KEMBAR78
[train_instruct_pix2pix.py]Fix the LR schedulers when `num_train_epochs` is passed in a distributed training env by AnandK27 · Pull Request #9316 · huggingface/diffusers · GitHub
Skip to content

Conversation

@AnandK27
Copy link
Contributor

What does this PR do?

Part of #8384

Test Script

export MODEL_NAME="runwayml/stable-diffusion-v1-5"
export DATASET_ID="fusing/instructpix2pix-1000-samples"

accelerate launch --mixed_precision="fp16" --multi_gpu train_instruct_pix2pix.py \
 --pretrained_model_name_or_path=runwayml/stable-diffusion-v1-5 \
 --dataset_name=sayakpaul/instructpix2pix-1000-samples \
 --use_ema \
 --enable_xformers_memory_efficient_attention \
 --resolution=512 --random_flip \
 --train_batch_size=4 --gradient_accumulation_steps=4 --gradient_checkpointing \
 --max_train_steps=15000 \
 --checkpointing_steps=5000 --checkpoints_total_limit=1 \
 --learning_rate=5e-05 --lr_warmup_steps=0 \
 --conditioning_dropout_prob=0.05 \
 --mixed_precision=fp16 \
 --seed=42

Fixes # (issue)
Fixes the LR Scheduler for num_train_epochs in train_instruct_pix2pix.py.

Before submitting

Who can review?

@sayakpaul
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@AnandK27
Copy link
Contributor Author

AnandK27 commented Sep 3, 2024

Hey @sayakpaul , you run the test and merge the changes if they are good to go!

@github-actions
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 28, 2024
@sayakpaul
Copy link
Member

So, sorry that this slipped through the cracks. Will merge once the CI is green.

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

@sayakpaul sayakpaul merged commit b28675c into huggingface:main Sep 28, 2024
8 checks passed
@sayakpaul
Copy link
Member

Thanks a lot for your contributions!

leisuzz pushed a commit to leisuzz/diffusers that referenced this pull request Oct 11, 2024
…hs` is passed in a distributed training env (huggingface#9316)

Fixed pix2pix lr scheduler

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
sayakpaul added a commit that referenced this pull request Dec 23, 2024
…hs` is passed in a distributed training env (#9316)

Fixed pix2pix lr scheduler

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale Issues that haven't received updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants