Add ability to designate a dataset as i2v or t2v for models that support it

This commit is contained in:
Jaret Burkett
2025-08-06 09:29:47 -06:00
parent 1755e58dd9
commit 5d8922fca2
10 changed files with 146 additions and 84 deletions

View File

@@ -880,6 +880,8 @@ class DatasetConfig:
# if true, will use a fask method to get image sizes. This can result in errors. Do not use unless you know what you are doing
self.fast_image_size: bool = kwargs.get('fast_image_size', False)
self.do_i2v: bool = kwargs.get('do_i2v', True) # do image to video on models that are both t2i and i2v capable
def preprocess_dataset_raw_config(raw_config: List[dict]) -> List[dict]:

View File

@@ -301,3 +301,10 @@ class DataLoaderBatchDTO:
del self.control_tensor
for file_item in self.file_items:
file_item.cleanup()
@property
def dataset_config(self) -> 'DatasetConfig':
if len(self.file_items) > 0:
return self.file_items[0].dataset_config
else:
return None