Skip to content

Conversation

@hshen14
Copy link
Contributor

@hshen14 hshen14 commented Dec 7, 2022

Per comments from #1499, this PR is to add examples with Intel optimizations for fine-tuning and inference. Bfloat16 fine-tuning is enabled for textual_inversion, while Bfloat16 inference is generally applicable for Stable Diffusion.

@hshen14
Copy link
Contributor Author

hshen14 commented Dec 7, 2022

@patrickvonplaten @anton-l @patil-suraj please review. Thanks.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Dec 7, 2022

The documentation is not available anymore as the PR was closed or merged.


## Research Projects

We also provide **research_projects** examples that can be used to accelerate the training (fine-tuning) and inference. These examples are useful and offer the extended capablities which are complementary to the official examples. You may refer to [research_projects](https://github.com/huggingface/diffusers/tree/main/examples/research_projects) for details.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
We also provide **research_projects** examples that can be used to accelerate the training (fine-tuning) and inference. These examples are useful and offer the extended capablities which are complementary to the official examples. You may refer to [research_projects](https://github.com/huggingface/diffusers/tree/main/examples/research_projects) for details.
We also provide **research_projects** examples that are maintained by the community as defined in the respective research project folders. These examples are useful and offer the extended capabilities which are complementary to the official examples. You may refer to [research_projects](https://github.com/huggingface/diffusers/tree/main/examples/research_projects) for details.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -0,0 +1,49 @@
import torch
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we add a README.md to research_projects/intel_opts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Added some initial ones. Please review. Thanks.

@hshen14
Copy link
Contributor Author

hshen14 commented Dec 8, 2022

@patrickvonplaten please let me know if you have additional comments.

Copy link
Member

@anton-l anton-l left a comment

Choose a reason for hiding this comment

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

Looks nice as a research example! @hshen14 some benchmark results would probably give the examples more visibility, but I'll leave the decision to include them up to you :)

@hshen14
Copy link
Contributor Author

hshen14 commented Dec 8, 2022

Looks nice as a research example! @hshen14 some benchmark results would probably give the examples more visibility, but I'll leave the decision to include them up to you :)

Thanks @anton-l. This is on my list to add it later, since BFloat16 support relies on 4th Gen of Intel Xeon Scalable Processor which will be available soon while early preview on AWS.

@@ -0,0 +1,15 @@
## Diffusers examples with Intel optimizations
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
## Diffusers examples with Intel optimizations
## Diffusers examples with Intel optimizations
**This research project is not actively maintained by the diffusers team. For any questions or comments, please make sure to tag @hshen14 .**

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@hshen14
Copy link
Contributor Author

hshen14 commented Dec 12, 2022

@patrickvonplaten The notes are updated accordingly per your comments. Please check. Thanks.

Copy link
Contributor

@patrickvonplaten patrickvonplaten left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

@patrickvonplaten patrickvonplaten merged commit c891330 into huggingface:main Dec 15, 2022
sliard pushed a commit to sliard/diffusers that referenced this pull request Dec 21, 2022
* Add examples with Intel optimizations (BF16 fine-tuning and inference)

* Remove unused package

* Add README for intel_opts and refine the description for research projects

* Add notes of intel opts for diffusers
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