mirror of
https://github.com/THUDM/CogVideo.git
synced 2025-09-26 17:30:05 +08:00
fix: normalize image tensors in I2VDataset
This commit is contained in:
parent
30ba1085ff
commit
b362663679
@ -143,6 +143,7 @@ class BaseI2VDataset(Dataset):
|
|||||||
logger.debug(f"Loaded encoded video from {encoded_video_path}", main_process_only=False)
|
logger.debug(f"Loaded encoded video from {encoded_video_path}", main_process_only=False)
|
||||||
# shape of image: [C, H, W]
|
# shape of image: [C, H, W]
|
||||||
_, image = self.preprocess(None, self.images[index])
|
_, image = self.preprocess(None, self.images[index])
|
||||||
|
image = self.image_transform(image)
|
||||||
else:
|
else:
|
||||||
frames, image = self.preprocess(video, image)
|
frames, image = self.preprocess(video, image)
|
||||||
frames = frames.to(self.device)
|
frames = frames.to(self.device)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user