unknown commited on
Commit
2237c94
1 Parent(s): cb48cb3

add examples

Browse files
Files changed (3) hide show
  1. app.py +9 -1
  2. examples/videos/1.mp4 +0 -0
  3. examples/videos/2.mp4 +0 -0
app.py CHANGED
@@ -154,7 +154,7 @@ class FoleyController:
154
  if seed_textbox != "":
155
  torch.manual_seed(int(seed_textbox))
156
  generator.manual_seed(int(seed_textbox))
157
- max_frame_nums = 15
158
  frames, duration = read_frames_with_moviepy(input_video, max_frame_nums=max_frame_nums)
159
  if duration >= 10:
160
  duration = 10
@@ -274,5 +274,13 @@ with gr.Blocks(css=css) as demo:
274
  outputs=[result_video],
275
  )
276
 
 
 
 
 
 
 
 
 
277
  demo.queue(10)
278
  demo.launch(server_name=args.server_name, server_port=args.port, share=args.share, allowed_paths=["./foleycrafter.png"])
 
154
  if seed_textbox != "":
155
  torch.manual_seed(int(seed_textbox))
156
  generator.manual_seed(int(seed_textbox))
157
+ max_frame_nums = 150
158
  frames, duration = read_frames_with_moviepy(input_video, max_frame_nums=max_frame_nums)
159
  if duration >= 10:
160
  duration = 10
 
274
  outputs=[result_video],
275
  )
276
 
277
+ gr.Examples(
278
+ examples= [
279
+ ['examples/videos/1.mp4', '', '', 1.0, 0.0, 'DDIM', 25, 7.5, 93493458],
280
+ ['examples/videos/2.mp4', '', '', 1.0, 0.0, 'DDIM', 25, 7.5, 51972214],
281
+ ],
282
+ inputs=[init_img,prompt_textbox,negative_prompt_textbox,ip_adapter_scale,temporal_scale,sampler_dropdown,sample_step_slider,cfg_scale_slider,seed_textbox],
283
+ )
284
+
285
  demo.queue(10)
286
  demo.launch(server_name=args.server_name, server_port=args.port, share=args.share, allowed_paths=["./foleycrafter.png"])
examples/videos/1.mp4 ADDED
Binary file (110 kB). View file
 
examples/videos/2.mp4 ADDED
Binary file (111 kB). View file