cbensimon HF staff commited on
Commit
1818c98
1 Parent(s): 61c766e

Pre-computed examples

Browse files
app.py CHANGED
@@ -25,11 +25,6 @@ snapshot_download(repo_id="runwayml/stable-diffusion-v1-5", local_dir="./stable-
25
  snapshot_download(repo_id="stabilityai/sd-vae-ft-mse", local_dir="./sd-vae-ft-mse")
26
  snapshot_download(repo_id="zcxu-eric/MagicAnimate", local_dir="./MagicAnimate")
27
 
28
- is_spaces = True if "SPACE_ID" in os.environ else False
29
- true_for_shared_ui = False #This will be true only if you are in a shared UI
30
- if(is_spaces):
31
- true_for_shared_ui = True if "zcxu-eric/magicanimate" in os.environ['SPACE_ID'] else False
32
-
33
 
34
  animator = MagicAnimate()
35
 
@@ -101,15 +96,13 @@ with gr.Blocks() as demo:
101
  gr.Examples(
102
  fn=animate,
103
  examples=[
104
- ["inputs/applications/source_image/monalisa.png", "inputs/applications/driving/densepose/running.mp4"],
105
- ["inputs/applications/source_image/demo4.png", "inputs/applications/driving/densepose/demo4.mp4"],
106
- ["inputs/applications/source_image/dalle2.jpeg", "inputs/applications/driving/densepose/running2.mp4"],
107
- ["inputs/applications/source_image/dalle8.jpeg", "inputs/applications/driving/densepose/dancing2.mp4"],
108
- ["inputs/applications/source_image/multi1_source.png", "inputs/applications/driving/densepose/multi_dancing.mp4"],
109
  ],
110
- inputs=[reference_image, motion_sequence],
111
- outputs=animation,
112
- cache_examples=true_for_shared_ui
113
  )
114
 
115
  # demo.queue(max_size=15, api_open=False)
 
25
  snapshot_download(repo_id="stabilityai/sd-vae-ft-mse", local_dir="./sd-vae-ft-mse")
26
  snapshot_download(repo_id="zcxu-eric/MagicAnimate", local_dir="./MagicAnimate")
27
 
 
 
 
 
 
28
 
29
  animator = MagicAnimate()
30
 
 
96
  gr.Examples(
97
  fn=animate,
98
  examples=[
99
+ ["inputs/applications/source_image/monalisa.png", "inputs/applications/driving/densepose/running.mp4", "inputs/applications/output/monalisa.png"],
100
+ ["inputs/applications/source_image/demo4.png", "inputs/applications/driving/densepose/demo4.mp4", "inputs/applications/output/demo4.png"],
101
+ ["inputs/applications/source_image/dalle2.jpeg", "inputs/applications/driving/densepose/running2.mp4", "inputs/applications/output/dalle2.jpeg"],
102
+ ["inputs/applications/source_image/dalle8.jpeg", "inputs/applications/driving/densepose/dancing2.mp4", "inputs/applications/output/dalle8.jpeg"],
103
+ ["inputs/applications/source_image/multi1_source.png", "inputs/applications/driving/densepose/multi_dancing.mp4", "inputs/applications/output/multi1_source.png"],
104
  ],
105
+ inputs=[reference_image, motion_sequence, animation],
 
 
106
  )
107
 
108
  # demo.queue(max_size=15, api_open=False)
inputs/applications/output/dalle2.mp4 ADDED
Binary file (767 kB). View file
 
inputs/applications/output/dalle8.mp4 ADDED
Binary file (581 kB). View file
 
inputs/applications/output/demo4.mp4 ADDED
Binary file (453 kB). View file
 
inputs/applications/output/monalisa.mp4 ADDED
Binary file (304 kB). View file
 
inputs/applications/output/multi1_source.mp4 ADDED
Binary file (554 kB). View file