chenyangqi commited on
Commit
17a220f
1 Parent(s): 4dff355

fix example argument

Browse files
Files changed (2) hide show
  1. app_fatezero.py +31 -29
  2. example.py +57 -0
app_fatezero.py CHANGED
@@ -212,9 +212,9 @@ with gr.Blocks(css='style.css') as demo:
212
  # - It takes a few minutes to download model first.
213
  # - Expected time to generate an 8-frame video: 70 seconds with T4, 24 seconds with A10G, (10 seconds with A100)
214
  # ''')
215
- gr.Markdown('''
216
- todo
217
- ''')
218
  with gr.Column():
219
  result = gr.Video(label='Result')
220
  result.style(height=512, width=512)
@@ -246,32 +246,34 @@ with gr.Blocks(css='style.css') as demo:
246
  step=1,
247
  value=10)
248
  with gr.Row():
249
- examples = [
250
- [
251
- 'CompVis/stable-diffusion-v1-4',
252
- 'FateZero/data/teaser_car-turn',
253
- 'a silver jeep driving down a curvy road in the countryside',
254
- 'watercolor painting of a silver jeep driving down a curvy road in the countryside',
255
- 0.8,
256
- 0.8,
257
- "watercolor",
258
- 10,
259
- 10,
260
- 7.5,
261
- ],
262
- [
263
- 'CompVis/stable-diffusion-v1-4',
264
- 'FateZero/data/style/sunflower',
265
- 'a yellow sunflower',
266
- 'van gogh style painting of a yellow sunflower',
267
- 0.5,
268
- 0.5,
269
- 'van gogh',
270
- 10,
271
- 10,
272
- 7.5,
273
- ],
274
- ]
 
 
275
  gr.Examples(examples=examples,
276
  inputs=[
277
  model_id,
 
212
  # - It takes a few minutes to download model first.
213
  # - Expected time to generate an 8-frame video: 70 seconds with T4, 24 seconds with A10G, (10 seconds with A100)
214
  # ''')
215
+ # gr.Markdown('''
216
+ # todo
217
+ # ''')
218
  with gr.Column():
219
  result = gr.Video(label='Result')
220
  result.style(height=512, width=512)
 
246
  step=1,
247
  value=10)
248
  with gr.Row():
249
+ from example import style_example
250
+ examples = style_example
251
+ # examples = [
252
+ # [
253
+ # 'CompVis/stable-diffusion-v1-4',
254
+ # 'FateZero/data/teaser_car-turn',
255
+ # 'a silver jeep driving down a curvy road in the countryside',
256
+ # 'watercolor painting of a silver jeep driving down a curvy road in the countryside',
257
+ # 0.8,
258
+ # 0.8,
259
+ # "watercolor",
260
+ # 10,
261
+ # 10,
262
+ # 7.5,
263
+ # ],
264
+ # [
265
+ # 'CompVis/stable-diffusion-v1-4',
266
+ # 'FateZero/data/style/sunflower',
267
+ # 'a yellow sunflower',
268
+ # 'van gogh style painting of a yellow sunflower',
269
+ # 0.5,
270
+ # 0.5,
271
+ # 'van gogh',
272
+ # 10,
273
+ # 10,
274
+ # 7.5,
275
+ # ],
276
+ # ]
277
  gr.Examples(examples=examples,
278
  inputs=[
279
  model_id,
example.py ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ style_example = [
2
+ [
3
+ 'CompVis/stable-diffusion-v1-4',
4
+ 'FateZero/data/teaser_car-turn',
5
+ 'a silver jeep driving down a curvy road in the countryside',
6
+ 'watercolor painting of a silver jeep driving down a curvy road in the countryside',
7
+ 0.8,
8
+ 0.8,
9
+ "watercolor",
10
+ 10,
11
+ 10,
12
+ 7.5,
13
+ # input video argument
14
+ None, 0, 8, 1, 0,0,0,0
15
+
16
+ ],
17
+ [
18
+ 'CompVis/stable-diffusion-v1-4',
19
+ 'FateZero/data/style/sunflower',
20
+ 'a yellow sunflower',
21
+ 'van gogh style painting of a yellow sunflower',
22
+ 0.5,
23
+ 0.5,
24
+ 'van gogh',
25
+ 10,
26
+ 10,
27
+ 7.5,
28
+ None, 0, 8, 1, 0,0,0,0
29
+ ],
30
+ [
31
+ 'CompVis/stable-diffusion-v1-4',
32
+ 'FateZero/data/style/surf',
33
+ 'a man with round helmet surfing on a white wave in blue ocean with a rope',
34
+ 'The Ukiyo-e style painting of a man with round helmet surfing on a white wave in blue ocean with a rope',
35
+ 0.9,
36
+ 0.9,
37
+ 'Ukiyo-e',
38
+ 10,
39
+ 10,
40
+ 7.5,
41
+ None, 0, 8, 1, 0,0,0,0
42
+ ],
43
+ [
44
+ 'CompVis/stable-diffusion-v1-4',
45
+ 'FateZero/FateZero/data/style/train',
46
+ 'a train traveling down tracks next to a forest filled with trees and flowers and a man on the side of the track',
47
+ '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',
48
+ 0.9,
49
+ 0.9,
50
+ 'Makoto Shinkai',
51
+ 10,
52
+ 10,
53
+ 7.5,
54
+ None, 0, 8, 1, 0,0,0,0
55
+ ],
56
+
57
+ ]