DeepSpeedExamples
DeepSpeedExamples copied to clipboard
Sd example opt
Applies optimization to the SD example:
- Adds optimized_iteration flag. This flag determines which portion of the iterations to be optimized. For instance optimized_iteration = 0 means no optimization and optimized_iteration = 0.2 meand %20 of the iterations to be optimized
- The SD pipeline is extracted from the HF library and replaces with the local version which includes the optimization: local_pipeline_stable_diffusion.py
- The optimization includes: limiting the noise computation to only conditional noise for the optimized iterations. This cuts the UNET computation in half for those iterations.