cbsjtu01 commited on
Commit
15a60b0
·
1 Parent(s): 8471f73

update app.py

Browse files
app.py CHANGED
@@ -403,7 +403,7 @@ class InferenceAgent:
403
  if temp_crop_video and os.path.exists(temp_crop_video): os.remove(temp_crop_video)
404
  if not vid_results: raise Exception("Driving video reading failed.")
405
  vid_tensor = torch.cat(vid_results, dim=0)
406
- return self.save_video(vid_tensor, fps=fps, audio_path=None)
407
 
408
  print("Initializing Configuration...")
409
  cfg = AppConfig()
@@ -542,12 +542,11 @@ with gr.Blocks(title="IMTalker Demo") as demo:
542
  # --- 图片示例 (独立) ---
543
  gr.Examples(
544
  examples=[
545
- ["examples/source_1.png"],
546
- ["examples/source_2.png"],
547
- ["examples/source_3.jpg"],
548
- ["examples/source_4.png"],
549
- ["examples/source_5.png"],
550
- ["examples/source_6.png"],
551
  ],
552
  inputs=[v_img],
553
  label="Example Images",
@@ -565,6 +564,7 @@ with gr.Blocks(title="IMTalker Demo") as demo:
565
  ["examples/driving_2.mp4"],
566
  ["examples/driving_3.mp4"],
567
  ["examples/driving_4.mp4"],
 
568
  ],
569
  inputs=[v_vid],
570
  label="Example Videos",
 
403
  if temp_crop_video and os.path.exists(temp_crop_video): os.remove(temp_crop_video)
404
  if not vid_results: raise Exception("Driving video reading failed.")
405
  vid_tensor = torch.cat(vid_results, dim=0)
406
+ return self.save_video(vid_tensor, fps=fps, audio_path=driving_video_path)
407
 
408
  print("Initializing Configuration...")
409
  cfg = AppConfig()
 
542
  # --- 图片示例 (独立) ---
543
  gr.Examples(
544
  examples=[
545
+ ["examples/source_7.png"],
546
+ ["examples/source_8.png"],
547
+ ["examples/source_9.jpg"],
548
+ ["examples/source_10.png"],
549
+ ["examples/source_11.png"],
 
550
  ],
551
  inputs=[v_img],
552
  label="Example Images",
 
564
  ["examples/driving_2.mp4"],
565
  ["examples/driving_3.mp4"],
566
  ["examples/driving_4.mp4"],
567
+ ["examples/driving_5.mp4"],
568
  ],
569
  inputs=[v_vid],
570
  label="Example Videos",
examples/driving_5.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b8db6c9b0ce183d9b533a8ce8038337a93bdfc7884d3a951fbf9ef60d6475684
3
+ size 561397
examples/source_10.png ADDED

Git LFS Details

  • SHA256: b4233970bdb448c159ce7c08efe6d6b55d81ac9b81fdf0aa04bf5f5abb4b4a19
  • Pointer size: 131 Bytes
  • Size of remote file: 246 kB
examples/source_11.png ADDED

Git LFS Details

  • SHA256: cd2648f32b026bf9fb8cd585dcc1f6d4a60659fe114b9ca192643c600de0ff2e
  • Pointer size: 131 Bytes
  • Size of remote file: 267 kB
examples/source_7.png ADDED

Git LFS Details

  • SHA256: 8075c7627e1d54a77a7d2df3ff5cbe9e31512080be8b083f5e35cbac90bc4cae
  • Pointer size: 131 Bytes
  • Size of remote file: 291 kB
examples/source_8.png ADDED

Git LFS Details

  • SHA256: ac5a5cdf4c13e6f2e78bd4dbade94d07b020f300ec78c6a249c2cf72ab8eed2d
  • Pointer size: 131 Bytes
  • Size of remote file: 192 kB
examples/source_9.png ADDED

Git LFS Details

  • SHA256: 9255752e4a21d4189cc738a2e813d1aeb678fca5ce9e0ac59ac24bfe84859a0b
  • Pointer size: 131 Bytes
  • Size of remote file: 102 kB