Skip to content

Commit 80f9fa3

Browse files
committed
Fix video generation while not in standalone
1 parent 235dcf1 commit 80f9fa3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/backbone.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ def torch_gc():
9999
launched_at = int(datetime.now().timestamp())
100100
backbone_current_seq_number = 0
101101

102-
def get_next_sequence_number(outpath=None, basename=None):
102+
# Make sure to preserve the function signature when calling!
103+
def get_next_sequence_number(outpath, basename):
103104
global backbone_current_seq_number
104105
backbone_current_seq_number += 1
105106
return int(f"{launched_at}{backbone_current_seq_number:04}")

src/video_mode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def gen_video(video, outpath, inp, custom_depthmap=None, colorvids_bitrate=None,
153153

154154
imgs = [x[2] for x in img_results if x[1] == gen]
155155
basename = f'{gen}_video'
156-
frames_to_video(fps, imgs, outpath, f"depthmap-{backbone.get_next_sequence_number()}-{basename}",
156+
frames_to_video(fps, imgs, outpath, f"depthmap-{backbone.get_next_sequence_number(outpath, basename)}-{basename}",
157157
colorvids_bitrate)
158158
print('All done. Video(s) saved!')
159159
return '<h3>Videos generated</h3>' if len(gens) > 1 else '<h3>Video generated</h3>' if len(gens) == 1 \

0 commit comments

Comments
 (0)