mirror of
https://github.com/storytold/FineTrainers-Conditioning.git
synced 2026-10-19 07:43:28 +00:00
Update for windows compability (#32)
* replaced lambda statements with local functions to work with pickle in dataset.py and moved collate function outside of main and added its own class in cogvideox_image_to_video_lora.py * Update cogvideox_image_to_video_lora.py Remove the bug-fix related to image encoding since it's already present in #31 * Update cogvideox_image_to_video_lora.py Revert to last commit (60c46827404cd4780ee0e7d3c9c56a953e2a04ca)
This commit is contained in:
+10
-2
@@ -86,12 +86,20 @@ class VideoDataset(Dataset):
|
||||
|
||||
self.video_transforms = transforms.Compose(
|
||||
[
|
||||
transforms.RandomHorizontalFlip(random_flip) if random_flip else transforms.Lambda(lambda x: x),
|
||||
transforms.Lambda(lambda x: x / 255.0),
|
||||
transforms.RandomHorizontalFlip(random_flip) if random_flip else transforms.Lambda(self.identity_transform),
|
||||
transforms.Lambda(self.scale_transform),
|
||||
transforms.Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5], inplace=True),
|
||||
]
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def identity_transform(x):
|
||||
return x
|
||||
|
||||
@staticmethod
|
||||
def scale_transform(x):
|
||||
return x / 255.0
|
||||
|
||||
def __len__(self) -> int:
|
||||
return self.num_videos
|
||||
|
||||
|
||||
Reference in New Issue
Block a user