Spaces:
Runtime error
Runtime error
Set a limitatin to the input video length
Browse files- app_pix2pix_video.py +1 -2
- model.py +1 -1
app_pix2pix_video.py
CHANGED
@@ -14,7 +14,6 @@ def create_demo(model: Model):
|
|
14 |
with gr.Row():
|
15 |
gr.Markdown('## Video Instruct Pix2Pix')
|
16 |
with gr.Row():
|
17 |
-
# gr.Markdown('### Description: Our current preview release supports arbitrary length videos, and for performance purposes the video is scaled down before processing. For faster inference you can choose lower output frames per seconds from Advanced Options.')
|
18 |
gr.HTML(
|
19 |
"""
|
20 |
<div style="text-align: left; max-width: 1200px; margin: 20px auto;">
|
@@ -49,7 +48,7 @@ def create_demo(model: Model):
|
|
49 |
step=1)
|
50 |
end_t = gr.Slider(label='End time in seconds (-1 corresponds to uploaded video duration)',
|
51 |
minimum=0,
|
52 |
-
maximum=
|
53 |
value=-1,
|
54 |
step=1)
|
55 |
out_fps = gr.Slider(label='Output video fps (-1 corresponds to uploaded video fps)',
|
|
|
14 |
with gr.Row():
|
15 |
gr.Markdown('## Video Instruct Pix2Pix')
|
16 |
with gr.Row():
|
|
|
17 |
gr.HTML(
|
18 |
"""
|
19 |
<div style="text-align: left; max-width: 1200px; margin: 20px auto;">
|
|
|
48 |
step=1)
|
49 |
end_t = gr.Slider(label='End time in seconds (-1 corresponds to uploaded video duration)',
|
50 |
minimum=0,
|
51 |
+
maximum=15,
|
52 |
value=-1,
|
53 |
step=1)
|
54 |
out_fps = gr.Slider(label='Output video fps (-1 corresponds to uploaded video fps)',
|
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 =
|
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 = 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)
|