Add D-OPSD as a distillation handeling option for MiniMax H3 ref2va

This commit is contained in:
Jaret Burkett committed 2026-08-26 11:06:33 -06:00
1 parent 8a912564ce
commit da79ebce99
10 files changed
+278 -15

No files matched your search

+16
View File
@@ -2247,6 +2247,22 @@ class BaseSDTrainProcess(BaseTrainProcess):
### HOOk ###
self.before_dataset_load()
if getattr(self.sd, 'require_pixel_tensor_cache', False):
# model needs pixel tensors at train time even with cached latents;
# storing them changes the latent cache key (first run re-caches)
for ds_list in [self.datasets, self.datasets_reg]:
if ds_list is None:
continue
for ds in ds_list:
if not (ds.cache_latents or ds.cache_latents_to_disk):
# live-loading datasets already have pixels on the batch
continue
if not ds.cache_tensors_to_disk:
print_acc(
f"Model requires cached pixel tensors: forcing "
f"cache_tensors_to_disk on dataset {ds.folder_path}"
)
ds.cache_tensors_to_disk = True
# load datasets if passed in the root process
if self.datasets is not None:
self.data_loader = get_dataloader_from_datasets(self.datasets, self.train_config.batch_size, self.sd)