Spaces:
Running
on
T4
Running
on
T4
PKUWilliamYang
commited on
Commit
•
5dea586
1
Parent(s):
31083ae
Update webUI/app_task.py
Browse files- webUI/app_task.py +18 -9
webUI/app_task.py
CHANGED
@@ -182,12 +182,15 @@ def create_demo_vediting(process, max_frame_num = 4):
|
|
182 |
maximum=2,
|
183 |
value=1,
|
184 |
step=0.1)
|
185 |
-
|
186 |
-
|
|
|
|
|
|
|
187 |
minimum=1,
|
188 |
maximum=max_frame_num,
|
189 |
value=4,
|
190 |
-
step=1)
|
191 |
#input_info = gr.Textbox(label='Process Information', interactive=False, value='n.a.')
|
192 |
run_button = gr.Button(label='Run')
|
193 |
gr.Examples(
|
@@ -216,12 +219,15 @@ def create_demo_vtoonify(process, max_frame_num = 4):
|
|
216 |
with gr.Column():
|
217 |
input_video = gr.Video(source='upload', mirror_webcam=False, type='filepath')
|
218 |
style_type = gr.Radio(label='Style Type', choices=['Pixar','Cartoon','Arcane'], value='Pixar')
|
219 |
-
|
220 |
-
|
|
|
|
|
|
|
221 |
minimum=1,
|
222 |
maximum=max_frame_num,
|
223 |
value=4,
|
224 |
-
step=1)
|
225 |
#input_info = gr.Textbox(label='Process Information', interactive=False, value='n.a.')
|
226 |
run_button = gr.Button(label='Run')
|
227 |
gr.Examples(
|
@@ -250,9 +256,12 @@ def create_demo_inversion(process, allow_optimization=False):
|
|
250 |
with gr.Row():
|
251 |
with gr.Column():
|
252 |
input_image = gr.Image(source='upload', type='filepath')
|
253 |
-
|
254 |
-
|
255 |
-
|
|
|
|
|
|
|
256 |
value='No optimization', interactive=allow_optimization)
|
257 |
input_latent = gr.File(label='Optimized latent code (optional)', file_types=[".pt"])
|
258 |
editing_options = gr.Dropdown(['None', 'Style Mixing',
|
|
|
182 |
maximum=2,
|
183 |
value=1,
|
184 |
step=0.1)
|
185 |
+
info = ''
|
186 |
+
if max_frame_num < 100:
|
187 |
+
info = '(full video editing is not allowed so as not to slow down the demo, \
|
188 |
+
but you can duplicate the Space to modify the number limit to a large value)'
|
189 |
+
frame_num = gr.Slider(label='Number of frames to edit' + info,
|
190 |
minimum=1,
|
191 |
maximum=max_frame_num,
|
192 |
value=4,
|
193 |
+
step=1)
|
194 |
#input_info = gr.Textbox(label='Process Information', interactive=False, value='n.a.')
|
195 |
run_button = gr.Button(label='Run')
|
196 |
gr.Examples(
|
|
|
219 |
with gr.Column():
|
220 |
input_video = gr.Video(source='upload', mirror_webcam=False, type='filepath')
|
221 |
style_type = gr.Radio(label='Style Type', choices=['Pixar','Cartoon','Arcane'], value='Pixar')
|
222 |
+
info = ''
|
223 |
+
if max_frame_num < 100:
|
224 |
+
info = '(full video toonify is not allowed so as not to slow down the demo, \
|
225 |
+
but you can duplicate the Space to modify the number limit from 4 to a large value)'
|
226 |
+
frame_num = gr.Slider(label='Number of frames to toonify' + info,
|
227 |
minimum=1,
|
228 |
maximum=max_frame_num,
|
229 |
value=4,
|
230 |
+
step=1)
|
231 |
#input_info = gr.Textbox(label='Process Information', interactive=False, value='n.a.')
|
232 |
run_button = gr.Button(label='Run')
|
233 |
gr.Examples(
|
|
|
256 |
with gr.Row():
|
257 |
with gr.Column():
|
258 |
input_image = gr.Image(source='upload', type='filepath')
|
259 |
+
info = ''
|
260 |
+
if allow_optimization == False:
|
261 |
+
info = ' (latent optimization is not allowed so as not to slow down the demo, \
|
262 |
+
but you can duplicate the Space to modify the option or directly upload an optimized latent file. \
|
263 |
+
The file can be computed by inversion.py from the github page or colab)'
|
264 |
+
optimize = gr.Radio(label='Whether optimize latent' + info, choices=['No optimization','Latent optimization'],
|
265 |
value='No optimization', interactive=allow_optimization)
|
266 |
input_latent = gr.File(label='Optimized latent code (optional)', file_types=[".pt"])
|
267 |
editing_options = gr.Dropdown(['None', 'Style Mixing',
|