ClownRat commited on
Commit
0d35a4c
•
1 Parent(s): a5e8583

Fix frame sampling scheme.

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -163,7 +163,7 @@ def generate(image, video, state, state_, textbox_in, temperature, top_p, max_ou
163
  tensor.append(process_image(image, processor).to(handler.model.device, dtype=dtype))
164
  modals.append('IMAGE')
165
  if not os.path.exists(image) and os.path.exists(video):
166
- tensor.append(process_video(video, processor, num_frames=num_frames, sample_scheme='fps').to(handler.model.device, dtype=dtype))
167
  modals.append('VIDEO')
168
  if os.path.exists(image) and os.path.exists(video):
169
  raise NotImplementedError("Not support image and video at the same time")
 
163
  tensor.append(process_image(image, processor).to(handler.model.device, dtype=dtype))
164
  modals.append('IMAGE')
165
  if not os.path.exists(image) and os.path.exists(video):
166
+ tensor.append(process_video(video, processor, num_frames=num_frames, sample_scheme='uniform').to(handler.model.device, dtype=dtype))
167
  modals.append('VIDEO')
168
  if os.path.exists(image) and os.path.exists(video):
169
  raise NotImplementedError("Not support image and video at the same time")