Skip to content

Commit

Permalink
normalize video_to_tensor output, thanks to @iejMac
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Nov 26, 2023
1 parent b2f105b commit dfd79cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions magvit2_pytorch/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ def video_to_tensor(

frames_torch = torch.tensor(frames).float()

frames_torch /= 255.

return frames_torch[:, :num_frames, :, :]

@beartype
Expand Down
2 changes: 1 addition & 1 deletion magvit2_pytorch/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.1.40'
__version__ = '0.1.41'

0 comments on commit dfd79cf

Please sign in to comment.