Skip to content

Commit

Permalink
Fix: fix a bug for args config_path (#6)
Browse files Browse the repository at this point in the history
* Fix: fix a bug for config_path

* Fix; fix bug for empty list

For example : set batch_size = 4
then keyframe got empty list and stop the running
keyframe indexes [[0, 26, 36, 54], [72, 87], [107, 122], [132, 159], [173, 183], [194, 206], [], [217, 229, 239]]
  • Loading branch information
jinwyp authored Mar 21, 2024
1 parent 370f61d commit 7436bab
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion run_fresco.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ def run_keyframe_translation(config):
add_num = 3 - len(sublists[-1])
sublists[-1] = sublists[-2][-add_num:] + sublists[-1]
sublists[-2] = sublists[-2][:-add_num]

if not sublists[-2]:
del sublists[-2]

print('processing %d batches:\nkeyframe indexes'%(len(sublists)), sublists)

Expand Down Expand Up @@ -305,7 +308,7 @@ def run_full_video_translation(config, keys):

print('=' * 100)
print('loading configuration...')
with open('./config/config_carturn.yaml', "r") as f:
with open(opt.config_path, "r") as f:
config = yaml.safe_load(f)

for name, value in sorted(config.items()):
Expand Down

0 comments on commit 7436bab

Please sign in to comment.