Skip to content

Commit

Permalink
Update video_utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
costiash authored Nov 11, 2022
1 parent 92aa668 commit 80f9cca
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions stable_diffusion_tf/video_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ def generate_init_frame(curr_prompt, args, generator):
temperature=1,
batch_size=1,
)

next_seed(args)
return img[0]

Expand All @@ -246,7 +245,12 @@ def construct_ffmpeg_video_cmd(args, frames_path, mp4_path):
mp4_path
]

return cmd
process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout, stderr = process.communicate()

if process.returncode != 0:
print(stderr)
raise RuntimeError(stderr)


def create_audio(args, sound_path, mp3_path):
Expand All @@ -259,6 +263,7 @@ def create_audio(args, sound_path, mp3_path):

process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout, stderr = process.communicate()

if process.returncode != 0:
print(stderr)
raise RuntimeError(stderr)
Expand All @@ -276,4 +281,9 @@ def construct_ffmpeg_combined_cmd(vid_path, aud_path, combined_path):
combined_path
]

return cmd
process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout, stderr = process.communicate()

if process.returncode != 0:
print(stderr)
raise RuntimeError(stderr)

0 comments on commit 80f9cca

Please sign in to comment.