lev1 commited on
Commit
fc198df
1 Parent(s): ae4f698

Description

Browse files
Files changed (2) hide show
  1. app_pix2pix_video.py +1 -2
  2. model.py +1 -1
app_pix2pix_video.py CHANGED
@@ -18,7 +18,7 @@ def create_demo(model: Model):
18
  """
19
  <div style="text-align: left; auto;">
20
  <h2 style="font-weight: 450; font-size: 1rem; margin: 0rem">
21
- Description: For performance purposes, our current preview release supports any input videos but caps output videos to no longer than 15 seconds and the input video is scaled down before processing. For faster inference you can choose lower output frames per seconds from Advanced Options.
22
  </h3>
23
  </div>
24
  """)
@@ -48,7 +48,6 @@ def create_demo(model: Model):
48
  end_t = gr.Slider(label='End time in seconds (-1 corresponds to uploaded video duration)',
49
  minimum=0,
50
  maximum=15,
51
- value=-1,
52
  step=1)
53
  out_fps = gr.Slider(label='Output video fps (-1 corresponds to uploaded video fps)',
54
  minimum=1,
18
  """
19
  <div style="text-align: left; auto;">
20
  <h2 style="font-weight: 450; font-size: 1rem; margin: 0rem">
21
+ Description: For performance purposes, our current preview release supports any input videos but caps output videos to no longer than 15 seconds and the input videos are scaled down before processing. For faster inference you can choose lower output frames per seconds from Advanced Options.
22
  </h3>
23
  </div>
24
  """)
48
  end_t = gr.Slider(label='End time in seconds (-1 corresponds to uploaded video duration)',
49
  minimum=0,
50
  maximum=15,
 
51
  step=1)
52
  out_fps = gr.Slider(label='Output video fps (-1 corresponds to uploaded video fps)',
53
  minimum=1,
model.py CHANGED
@@ -239,7 +239,7 @@ class Model:
239
  return utils.create_gif(result, fps)
240
 
241
  def process_pix2pix(self, video, prompt, resolution=512, seed=0, start_t=0, end_t=-1, out_fps=-1):
242
- end_t = 15
243
  if self.model_type != ModelType.Pix2Pix_Video:
244
  self.set_model(ModelType.Pix2Pix_Video, model_id="timbrooks/instruct-pix2pix")
245
  self.pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(self.pipe.scheduler.config)
239
  return utils.create_gif(result, fps)
240
 
241
  def process_pix2pix(self, video, prompt, resolution=512, seed=0, start_t=0, end_t=-1, out_fps=-1):
242
+ end_t = start_t+15
243
  if self.model_type != ModelType.Pix2Pix_Video:
244
  self.set_model(ModelType.Pix2Pix_Video, model_id="timbrooks/instruct-pix2pix")
245
  self.pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(self.pipe.scheduler.config)