Update app.py
Browse files
app.py
CHANGED
@@ -155,7 +155,7 @@ cache_pipeline = {
|
|
155 |
|
156 |
@spaces.GPU
|
157 |
def infer(
|
158 |
-
base_model, variant, prompt, seed=0, randomize_seed=True,
|
159 |
):
|
160 |
# if pipe_dict[base_model][variant] is None:
|
161 |
# if base_model == "ModelScope T2V":
|
@@ -246,42 +246,50 @@ examples = [
|
|
246 |
"ModelScope T2V",
|
247 |
"LAION-aes",
|
248 |
"Aerial uhd 4k view. mid-air flight over fresh and clean mountain river at sunny summer morning. Green trees and sun rays on horizon. Direct on sun.",
|
|
|
249 |
],
|
250 |
["ModelScope T2V", "Anime", "Timelapse misty mountain landscape"],
|
251 |
[
|
252 |
"ModelScope T2V",
|
253 |
"WebVid",
|
254 |
"Back of woman in shorts going near pure creek in beautiful mountains.",
|
|
|
255 |
],
|
256 |
[
|
257 |
"ModelScope T2V",
|
258 |
"3D Cartoon",
|
259 |
"A rotating pandoro (a traditional italian sweet yeast bread, most popular around christmas and new year) being eaten in time-lapse.",
|
|
|
260 |
],
|
261 |
[
|
262 |
"ModelScope T2V",
|
263 |
"Realistic",
|
264 |
"Slow motion avocado with a stone falls and breaks into 2 parts with splashes",
|
|
|
265 |
],
|
266 |
[
|
267 |
-
"AnimateDiff (
|
268 |
"LAION-aes",
|
269 |
"Slow motion of delicious salmon sachimi set with green vegetables leaves served on wood plate. make homemade japanese food at home.-dan",
|
|
|
270 |
],
|
271 |
[
|
272 |
-
"AnimateDiff (
|
273 |
"WebVid",
|
274 |
"Blooming meadow panorama zoom-out shot heavenly clouds and upcoming thunderstorm in mountain range harz, germany.",
|
|
|
275 |
],
|
276 |
[
|
277 |
"AnimateDiff (RealisticVision)",
|
278 |
"LAION-aes",
|
279 |
"A young woman in a yellow sweater uses vr glasses, sitting on the shore of a pond on a background of dark waves. a strong wind develops her hair, the sun's rays are reflected from the water.",
|
|
|
280 |
],
|
281 |
[
|
282 |
"AnimateDiff (RealisticVision)",
|
283 |
"LAION-aes",
|
284 |
"Female running at sunset. healthy fitness concept",
|
|
|
285 |
],
|
286 |
]
|
287 |
|
@@ -391,7 +399,7 @@ with gr.Blocks(css=css) as demo:
|
|
391 |
|
392 |
gr.Examples(
|
393 |
examples=examples,
|
394 |
-
inputs=[base_model, variant_dropdown, prompt],
|
395 |
cache_examples=True,
|
396 |
fn=infer,
|
397 |
outputs=[result],
|
@@ -403,9 +411,9 @@ with gr.Blocks(css=css) as demo:
|
|
403 |
base_model,
|
404 |
variant_dropdown,
|
405 |
prompt,
|
|
|
406 |
seed,
|
407 |
randomize_seed,
|
408 |
-
num_inference_steps,
|
409 |
],
|
410 |
outputs=[result],
|
411 |
)
|
|
|
155 |
|
156 |
@spaces.GPU
|
157 |
def infer(
|
158 |
+
base_model, variant, prompt, num_inference_steps=4, seed=0, randomize_seed=True,
|
159 |
):
|
160 |
# if pipe_dict[base_model][variant] is None:
|
161 |
# if base_model == "ModelScope T2V":
|
|
|
246 |
"ModelScope T2V",
|
247 |
"LAION-aes",
|
248 |
"Aerial uhd 4k view. mid-air flight over fresh and clean mountain river at sunny summer morning. Green trees and sun rays on horizon. Direct on sun.",
|
249 |
+
4
|
250 |
],
|
251 |
["ModelScope T2V", "Anime", "Timelapse misty mountain landscape"],
|
252 |
[
|
253 |
"ModelScope T2V",
|
254 |
"WebVid",
|
255 |
"Back of woman in shorts going near pure creek in beautiful mountains.",
|
256 |
+
4
|
257 |
],
|
258 |
[
|
259 |
"ModelScope T2V",
|
260 |
"3D Cartoon",
|
261 |
"A rotating pandoro (a traditional italian sweet yeast bread, most popular around christmas and new year) being eaten in time-lapse.",
|
262 |
+
4
|
263 |
],
|
264 |
[
|
265 |
"ModelScope T2V",
|
266 |
"Realistic",
|
267 |
"Slow motion avocado with a stone falls and breaks into 2 parts with splashes",
|
268 |
+
4
|
269 |
],
|
270 |
[
|
271 |
+
"AnimateDiff (RealisticVision)",
|
272 |
"LAION-aes",
|
273 |
"Slow motion of delicious salmon sachimi set with green vegetables leaves served on wood plate. make homemade japanese food at home.-dan",
|
274 |
+
8
|
275 |
],
|
276 |
[
|
277 |
+
"AnimateDiff (RealisticVision)",
|
278 |
"WebVid",
|
279 |
"Blooming meadow panorama zoom-out shot heavenly clouds and upcoming thunderstorm in mountain range harz, germany.",
|
280 |
+
8
|
281 |
],
|
282 |
[
|
283 |
"AnimateDiff (RealisticVision)",
|
284 |
"LAION-aes",
|
285 |
"A young woman in a yellow sweater uses vr glasses, sitting on the shore of a pond on a background of dark waves. a strong wind develops her hair, the sun's rays are reflected from the water.",
|
286 |
+
8
|
287 |
],
|
288 |
[
|
289 |
"AnimateDiff (RealisticVision)",
|
290 |
"LAION-aes",
|
291 |
"Female running at sunset. healthy fitness concept",
|
292 |
+
8
|
293 |
],
|
294 |
]
|
295 |
|
|
|
399 |
|
400 |
gr.Examples(
|
401 |
examples=examples,
|
402 |
+
inputs=[base_model, variant_dropdown, prompt, num_inference_steps],
|
403 |
cache_examples=True,
|
404 |
fn=infer,
|
405 |
outputs=[result],
|
|
|
411 |
base_model,
|
412 |
variant_dropdown,
|
413 |
prompt,
|
414 |
+
num_inference_steps,
|
415 |
seed,
|
416 |
randomize_seed,
|
|
|
417 |
],
|
418 |
outputs=[result],
|
419 |
)
|