Read git diff HEAD~. Do we really need rebalanceregularizationimages?
Jump to turn (8)
- 1Read git diff HEAD~. Do we really need rebalanceregularizationimages?
- 2Is the regularization image balance correct after the filtering in all other dat
- 3Refactor it to remove duplicate code in reg imag balancing.
- 4Why do we need to call registerbalancedregularizationimages at two places, then
- 5Ok I've did some cleanup. Now check another issue: In every dataset type, does e
- 6In ControlNetDataset.init, why can we ignore missing conditioning images when th
- 7Can we avoid calling self.updatedatasetimagecounts() two times when reg image co
- 8Do it
- User
Read
git diff HEAD~. Do we really needrebalance_regularization_images? - Assistant
Short answer: I’d keep it.
rebalance_regularization_imagesis not required for the code to run, but it is required to preserve DreamBooth’s intended train/reg balance after the new original-resolution filtering.- Existing DreamBooth logic already balances reg images to train images during dataset build (
library/train_util.py:2279), but filtering now happens later inmake_buckets(library/train_util.py:1051), which can break that balance. - Without rebalance, filtering can silently skew prior-preservation strength (too much or too little regularization), depending on whether train or reg images were filtered.
- The override in
DreamBoothDataset.filter_registered_images_by_orig_resolution() is the fix for that post-filter skew.