mirror of
https://github.com/ostris/ai-toolkit.git
synced 2026-01-26 16:39:47 +00:00
Add ability to designate a dataset as i2v or t2v for models that support it
This commit is contained in:
@@ -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]:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user