yerang commited on
Commit
6ecb068
ยท
verified ยท
1 Parent(s): 343115e

Update stf_utils.py

Browse files
Files changed (1) hide show
  1. stf_utils.py +9 -9
stf_utils.py CHANGED
@@ -134,15 +134,15 @@ class STFPipeline:
134
 
135
 
136
  try:
137
- # ์ˆœ์ฐจ์ ์œผ๋กœ gen_infer๋ฅผ ์‹คํ–‰
138
- gen_infer = self.template.gen_infer(audio_segment, pivot)
139
-
140
- for idx, (it, chunk) in enumerate(gen_infer, pivot):
141
- frame = next(reader) # ๋‹ค์Œ ํ”„๋ ˆ์ž„์„ ์ฝ์Œ
142
- composed = self.template.compose(idx, frame, it) # ํ•ฉ์„ฑ ์ž‘์—… ์ˆ˜ํ–‰
143
- frame_name = f"{idx}".zfill(5) + ".jpg"
144
- results.append(it['pred']) # ๊ฒฐ๊ณผ๋ฅผ ์ €์žฅ
145
- pivot = idx + 1
146
 
147
  except StopIteration as e:
148
  pass
 
134
 
135
 
136
  try:
137
+ # ์ˆœ์ฐจ์ ์œผ๋กœ gen_infer๋ฅผ ์‹คํ–‰
138
+ gen_infer = self.template.gen_infer(audio_segment, pivot)
139
+
140
+ for idx, (it, chunk) in enumerate(gen_infer, pivot):
141
+ frame = next(reader) # ๋‹ค์Œ ํ”„๋ ˆ์ž„์„ ์ฝ์Œ
142
+ composed = self.template.compose(idx, frame, it) # ํ•ฉ์„ฑ ์ž‘์—… ์ˆ˜ํ–‰
143
+ frame_name = f"{idx}".zfill(5) + ".jpg"
144
+ results.append(it['pred']) # ๊ฒฐ๊ณผ๋ฅผ ์ €์žฅ
145
+ pivot = idx + 1
146
 
147
  except StopIteration as e:
148
  pass