-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explicitly return each generated video filepath from test_stage_2.py #51
base: main
Are you sure you want to change the base?
Conversation
test_stage_2.py
Outdated
# 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, | ||
# ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solved by choosing a different height and width
TODO: update docs |
Enable this repo to be imported into other codebases for different handling of queueing, etc.