mayuema commited on
Commit
6dcf9e0
1 Parent(s): d1820b1
FollowYourPose/__pycache__/test_followyourpose.cpython-38.pyc CHANGED
Binary files a/FollowYourPose/__pycache__/test_followyourpose.cpython-38.pyc and b/FollowYourPose/__pycache__/test_followyourpose.cpython-38.pyc differ
 
FollowYourPose/test_followyourpose.py CHANGED
@@ -175,7 +175,7 @@ def test(
175
  skeleton_path=skeleton_path,
176
  **validation_data).videos
177
  save_path = f"{output_dir}/inference/sample-{global_step}-{str(seed)}-{now}/{prompt}.gif"
178
- save_videos_grid(sample, save_path)
179
  # samples.append(sample)
180
  # samples = torch.concat(samples)
181
  # save_path = f"{output_dir}/inference/sample-{global_step}-{str(seed)}-{now}.mp4"
 
175
  skeleton_path=skeleton_path,
176
  **validation_data).videos
177
  save_path = f"{output_dir}/inference/sample-{global_step}-{str(seed)}-{now}/{prompt}.gif"
178
+ save_videos_grid(sample, save_path, fps=4)
179
  # samples.append(sample)
180
  # samples = torch.concat(samples)
181
  # save_path = f"{output_dir}/inference/sample-{global_step}-{str(seed)}-{now}.mp4"
__pycache__/example.cpython-38.pyc CHANGED
Binary files a/__pycache__/example.cpython-38.pyc and b/__pycache__/example.cpython-38.pyc differ
 
__pycache__/inference_followyourpose.cpython-38.pyc CHANGED
Binary files a/__pycache__/inference_followyourpose.cpython-38.pyc and b/__pycache__/inference_followyourpose.cpython-38.pyc differ
 
app.py CHANGED
@@ -7,7 +7,8 @@ import os
7
  import gradio as gr
8
 
9
  from inference_followyourpose import merge_config_then_run
10
-
 
11
 
12
  HF_TOKEN = os.getenv('HF_TOKEN')
13
  pipe = merge_config_then_run()
@@ -155,6 +156,20 @@ with gr.Blocks(css='style.css') as demo:
155
  with gr.Row():
156
  from example import style_example
157
  examples = style_example
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
  inputs = [
159
  user_input_video,
160
  target_prompt,
 
7
  import gradio as gr
8
 
9
  from inference_followyourpose import merge_config_then_run
10
+ import sys
11
+ sys.path.append('FollowYourPose')
12
 
13
  HF_TOKEN = os.getenv('HF_TOKEN')
14
  pipe = merge_config_then_run()
 
156
  with gr.Row():
157
  from example import style_example
158
  examples = style_example
159
+
160
+ gr.Examples(examples=examples,
161
+ inputs = [
162
+ user_input_video,
163
+ target_prompt,
164
+ num_steps,
165
+ guidance_scale,
166
+ video_type,
167
+ *ImageSequenceDataset_list
168
+ ],
169
+ outputs=result,
170
+ fn=pipe.run,
171
+ cache_examples=True,
172
+ )
173
  inputs = [
174
  user_input_video,
175
  target_prompt,
data/dancing_example_1.mp4 ADDED
Binary file (510 kB). View file
 
data/dancing_example_2.mp4 ADDED
Binary file (489 kB). View file
 
data/dancing_example_3.mp4 ADDED
Binary file (791 kB). View file
 
data/dancing_example_4.mp4 ADDED
Binary file (953 kB). View file
 
example.py CHANGED
@@ -1,85 +1,47 @@
 
 
 
1
  num_steps = 30
2
  style_example = [
3
  [
4
- 'CompVis/stable-diffusion-v1-4',
5
- 'FateZero/data/teaser_car-turn.mp4',
6
- 'a silver jeep driving down a curvy road in the countryside',
7
- 'watercolor painting of a silver jeep driving down a curvy road in the countryside',
8
- 0.8,
9
- 0.8,
10
- "watercolor",
11
- 10,
12
- num_steps,
13
- 7.5,
14
- # input video argument
15
- None, 0, 8, 1, 0,0,0,0
16
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  ]
18
- # [
19
- # 'CompVis/stable-diffusion-v1-4',
20
- # 'FateZero/data/style/sunflower.mp4',
21
- # 'a yellow sunflower',
22
- # 'van gogh style painting of a yellow sunflower',
23
- # 0.5,
24
- # 0.5,
25
- # 'van gogh',
26
- # 10,
27
- # num_steps,
28
- # 7.5,
29
- # None, 0, 8, 1, 0,0,0,0
30
- # ],
31
- # [
32
- # 'CompVis/stable-diffusion-v1-4',
33
- # 'FateZero/data/style/surf.mp4',
34
- # 'a man with round helmet surfing on a white wave in blue ocean with a rope',
35
- # 'The Ukiyo-e style painting of a man with round helmet surfing on a white wave in blue ocean with a rope',
36
- # 0.9,
37
- # 0.9,
38
- # 'Ukiyo-e',
39
- # 10,
40
- # num_steps,
41
- # 7.5,
42
- # None, 0, 8, 1, 0,0,0,0
43
- # ],
44
- # [
45
- # 'CompVis/stable-diffusion-v1-4',
46
- # 'FateZero/data/style/train.mp4',
47
- # 'a train traveling down tracks next to a forest filled with trees and flowers and a man on the side of the track',
48
- # 'a train traveling down tracks next to a forest filled with trees and flowers and a man on the side of the track Makoto Shinkai style',
49
- # 0.9,
50
- # 0.9,
51
- # 'Makoto Shinkai',
52
- # 10,
53
- # num_steps,
54
- # 7.5,
55
- # None, 0, 8, 28, 0,0,0,0
56
- # ],
57
-
58
- # [
59
- # 'CompVis/stable-diffusion-v1-4',
60
- # 'FateZero/data/attribute/swan_swarov.mp4',
61
- # 'a black swan with a red beak swimming in a river near a wall and bushes',
62
- # 'a Swarovski crystal swan with a red beak swimming in a river near a wall and bushes',
63
- # 0.8,
64
- # 0.6,
65
- # 'Swarovski crystal',
66
- # 10,
67
- # num_steps,
68
- # 7.5,
69
- # None, 0, 8, 1, 0,0,0,0
70
- # ],
71
- # [
72
- # 'CompVis/stable-diffusion-v1-4',
73
- # 'FateZero/data/attribute/squirrel_carrot.mp4',
74
- # 'A squirrel is eating a carrot',
75
- # 'A rabbit is eating a eggplant',
76
- # 0.5,
77
- # 0.5,
78
- # 'rabbit eggplant',
79
- # 10,
80
- # num_steps,
81
- # 7.5,
82
- # None, 0, 8, 1, 0,0,0,0
83
- # ],
84
 
85
  ]
 
1
+ import sys
2
+ sys.path.append('FollowYourPose')
3
+
4
  num_steps = 30
5
  style_example = [
6
  [
7
+ "data/dancing_example_1.mp4",
8
+ "Iron man in the beach",
9
+ 50,
10
+ 12,
11
+ "Skeleton Video",
12
+ 8,1,0,0,0,0
13
+ ],
14
+ [
15
+ "data/dancing_example_2.mp4",
16
+ "A man in the beach, Van Gogh style",
17
+ 50,
18
+ 12,
19
+ "Skeleton Video",
20
+ 8,1,0,0,0,0
21
+ ],
22
+ [
23
+ "data/dancing_example_3.mp4",
24
+ "Astronauts on the moon",
25
+ 50,
26
+ 12,
27
+ "Skeleton Video",
28
+ 8,1,0,0,0,0
29
+ ],
30
+ [
31
+ "data/dancing_example_4.mp4",
32
+ "Superman on the forest",
33
+ 50,
34
+ 12,
35
+ "Raw Video",
36
+ 8,1,0,0,0,0
37
+ ],
38
+ [
39
+ "data/dancing_example_5.mp4",
40
+ "Hulk on the sea",
41
+ 50,
42
+ 12,
43
+ "Raw Video",
44
+ 8,1,0,0,0,0
45
  ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
 
47
  ]