Spaces:
Runtime error
Runtime error
set maximum length for input videos
Browse files- app_pix2pix_video.py +10 -1
- model.py +1 -0
app_pix2pix_video.py
CHANGED
@@ -14,7 +14,16 @@ 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 |
|
19 |
with gr.Row():
|
20 |
with gr.Column():
|
|
|
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;">
|
21 |
+
<h3 style="font-weight: 900; font-size: 3rem; margin: 0rem">
|
22 |
+
Description: Our current preview release supports videos no longer than 10 second.
|
23 |
+
For performance purposes the video is scaled down before processing. For faster inference you can choose lower output frames per seconds from Advanced Options.
|
24 |
+
</h3>
|
25 |
+
</div>
|
26 |
+
""")
|
27 |
|
28 |
with gr.Row():
|
29 |
with gr.Column():
|
model.py
CHANGED
@@ -239,6 +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 |
if self.model_type != ModelType.Pix2Pix_Video:
|
243 |
self.set_model(ModelType.Pix2Pix_Video, model_id="timbrooks/instruct-pix2pix")
|
244 |
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 = 10
|
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)
|