harry900000 commited on
Commit
16293fe
·
1 Parent(s): 32a4d55

add rgb video input

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -269,6 +269,7 @@ def inference(cfg, control_inputs) -> Tuple[List[str], List[str]]:
269
 
270
  @spaces.GPU()
271
  def generate_video(
 
272
  hdmap_video_input,
273
  lidar_video_input,
274
  prompt,
@@ -290,6 +291,7 @@ def generate_video(
290
  "hdmap": {"control_weight": 0.3, "input_control": hdmap_video_input},
291
  "lidar": {"control_weight": 0.7, "input_control": lidar_video_input},
292
  },
 
293
  checkpoint_dir=CHECKPOINTS_PATH,
294
  prompt=prompt,
295
  negative_prompt=negative_prompt,
@@ -316,6 +318,7 @@ with gr.Blocks() as demo:
316
  )
317
  with gr.Row():
318
  with gr.Column():
 
319
  hdmap_input = gr.Video(label="Input HD Map Video", format="mp4")
320
  lidar_input = gr.Video(label="Input LiDAR Video", format="mp4")
321
 
@@ -347,7 +350,7 @@ with gr.Blocks() as demo:
347
 
348
  generate_button.click(
349
  fn=generate_video,
350
- inputs=[hdmap_input, lidar_input, prompt_input, negative_prompt_input, seed_input, randomize_seed_checkbox],
351
  outputs=[output_video, output_file, seed_input],
352
  )
353
 
 
269
 
270
  @spaces.GPU()
271
  def generate_video(
272
+ rgb_video_path,
273
  hdmap_video_input,
274
  lidar_video_input,
275
  prompt,
 
291
  "hdmap": {"control_weight": 0.3, "input_control": hdmap_video_input},
292
  "lidar": {"control_weight": 0.7, "input_control": lidar_video_input},
293
  },
294
+ input_video_path=rgb_video_path,
295
  checkpoint_dir=CHECKPOINTS_PATH,
296
  prompt=prompt,
297
  negative_prompt=negative_prompt,
 
318
  )
319
  with gr.Row():
320
  with gr.Column():
321
+ rgb_video_input = gr.Video(label="Input RGB Video", format="mp4")
322
  hdmap_input = gr.Video(label="Input HD Map Video", format="mp4")
323
  lidar_input = gr.Video(label="Input LiDAR Video", format="mp4")
324
 
 
350
 
351
  generate_button.click(
352
  fn=generate_video,
353
+ inputs=[rgb_video_input, hdmap_input, lidar_input, prompt_input, negative_prompt_input, seed_input, randomize_seed_checkbox],
354
  outputs=[output_video, output_file, seed_input],
355
  )
356