* Optimizations to the training model
Based on the changes made in
textual_inversion I carried over the relevant changes that improve model training. These changes reduce the amount of memory used, significantly improve the speed at which training runs, and improves the quality of the results.
It also fixes the problem where the model trainer wouldn't automatically stop when it hit the set number of steps.
* Update main.py
Cleaned up whitespace