Skip to content

Conversation

@rootonchair
Copy link
Contributor

@rootonchair rootonchair commented Jan 21, 2024

What does this PR do?

Part of #6545

Before submitting

Who can review?

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.

@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 Feb 21, 2024
@yiyixuxu yiyixuxu requested a review from sayakpaul February 21, 2024 23:36
@yiyixuxu yiyixuxu removed the stale Issues that haven't received updates label Feb 21, 2024
@yiyixuxu
Copy link
Collaborator

cc @sayakpaul
should we merge this in?

if global_step >= args.max_train_steps:
break

images = []
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need to initialize it here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't. I will delete this line

Copy link
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

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

Looks very good. Thanks a lot for working on this.

Could you also provide some sample training commands with which we could test this?

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

@rootonchair
Copy link
Contributor Author

Hi @sayakpaul, you could test it with the following line

accelerate launch examples/dreambooth/train_dreambooth_lora.py --pretrained_model_name_or_path="runwayml/stable-diffusion-v1-5" --instance_data_dir="dog" --output_dir=dog_lora --instance_prompt="a photo of sks dog" --train_batch_size=1 --resolution=512 --checkpointing_steps=100 --learning_rate=1e-4 --max_train_steps=500 --validation_prompt="a photo of sks dog in a bucket" --validation_epochs=50 --seed="0"

Copy link
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

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

Just one change requested. Thanks a lot for working on this!

Ran with your command:

accelerate launch train_dreambooth_lora.py --pretrained_model_name_or_path="runwayml/stable-diffusion-v1-5" --instance_data_dir="dog" --output_dir=dog_lora --instance_prompt="a photo of sks dog" --train_batch_size=1 --resolution=512 --checkpointing_steps=100 --learning_rate=1e-4 --max_train_steps=500 --validation_prompt="a photo of sks dog in a bucket" --validation_epochs=50 --seed="0" --report_to="wandb"

Working perfectly: https://wandb.ai/sayakpaul/dreambooth-lora/runs/ligw3fg4

@sayakpaul sayakpaul merged commit f11b922 into huggingface:main Feb 26, 2024
@sayakpaul
Copy link
Member

Thanks a lot for working on this!

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