lev1 commited on
Commit
b36bba0
1 Parent(s): 0c7b60a

Video length limitation

Browse files
Files changed (2) hide show
  1. app_pix2pix_video.py +2 -2
  2. model.py +1 -1
app_pix2pix_video.py CHANGED
@@ -49,12 +49,12 @@ def create_demo(model: Model):
49
  step=0.1)
50
  start_t = gr.Slider(label='Starting time in seconds',
51
  minimum=0,
52
- maximum=10,
53
  value=0,
54
  step=1)
55
  end_t = gr.Slider(label='End time in seconds (-1 corresponds to uploaded video duration)',
56
  minimum=0,
57
- maximum=10,
58
  value=-1,
59
  step=1)
60
  out_fps = gr.Slider(label='Output video fps (-1 corresponds to uploaded video fps)',
 
49
  step=0.1)
50
  start_t = gr.Slider(label='Starting time in seconds',
51
  minimum=0,
52
+ maximum=15,
53
  value=0,
54
  step=1)
55
  end_t = gr.Slider(label='End time in seconds (-1 corresponds to uploaded video duration)',
56
  minimum=0,
57
+ maximum=15,
58
  value=-1,
59
  step=1)
60
  out_fps = gr.Slider(label='Output video fps (-1 corresponds to uploaded video fps)',
model.py CHANGED
@@ -140,7 +140,7 @@ class Model:
140
  negative_prompts = 'longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality'
141
 
142
  video, fps = utils.prepare_video(
143
- video_path, resolution, self.device, self.dtype, False)
144
  control = utils.pre_process_canny(
145
  video, low_threshold, high_threshold).to(self.device).to(self.dtype)
146
  f, _, h, w = video.shape
 
140
  negative_prompts = 'longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality'
141
 
142
  video, fps = utils.prepare_video(
143
+ video_path, resolution, self.device, self.dtype, False, 0, 15)
144
  control = utils.pre_process_canny(
145
  video, low_threshold, high_threshold).to(self.device).to(self.dtype)
146
  f, _, h, w = video.shape