Explicitly return each generated video filepath from test_stage_2.py#51
Open
ansonkao wants to merge 15 commits intoTMElyralab:mainfrom
Open
Explicitly return each generated video filepath from test_stage_2.py#51ansonkao wants to merge 15 commits intoTMElyralab:mainfrom
ansonkao wants to merge 15 commits intoTMElyralab:mainfrom
Conversation
ansonkao
commented
Jun 12, 2024
test_stage_2.py
Outdated
Comment on lines
+223
to
+231
| # video = torch.cat([ref_image_tensor, pose_tensor[:,:,:L], video[:,:,:L]], dim=0) | ||
| # video = scale_video(video, original_width, original_height) | ||
| # output_path2 = f"{save_dir}/{ref_name}_{pose_name}_{cfg}_{steps}_{skip}_{m1}_{m2}.mp4" | ||
| # save_videos_grid( | ||
| # video, | ||
| # output_path2, | ||
| # n_rows=3, | ||
| # fps=src_fps if fps is None else fps, | ||
| # ) |
Contributor
Author
There was a problem hiding this comment.
I commented this out, because I was consistently getting the following error:
Traceback (most recent call last):
File "/root/test_stage_2.py", line 238, in <module>
main()
File "/root/test_stage_2.py", line 232, in main
handle_single(ref_image_path, pose_video_path)
File "/root/test_stage_2.py", line 211, in handle_single
video = torch.cat([ref_image_tensor, pose_tensor[:,:,:L], video[:,:,:L]], dim=0)
RuntimeError: Sizes of tensors must match except in dimension 0. Expected size 540 but got size 536 for tensor number 2 in the list.
The way the code was saving outputs to the disk before, these errors would fail silently. But with this PR, they will be blocking.
Contributor
Author
There was a problem hiding this comment.
I just realized the cause: This is for video generations that are 16:9 aspect ratio, e.g. 960 height and 540 width. 540 converted to latent space is halfway between 536 and 544...
Contributor
Author
There was a problem hiding this comment.
Solved by choosing a different height and width
Contributor
Author
|
TODO: update docs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enable this repo to be imported into other codebases for different handling of queueing, etc.