talalif commited on
Commit
53cf322
·
verified ·
1 Parent(s): 3a69b87

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -74,21 +74,24 @@ def run(duration=240):
74
  #subprocess.run(["python", "./MuseV/text2video.py", "--sd_model_name", "majicmixRealv6Fp16", "--unet_model_name", "musev_referencenet", "--referencenet_model_name", "musev_referencenet", "--ip_adapter_model_name", "musev_referencenet", "-test_data_path", "./MuseV/configs/tasks/example.yaml", "--output_dir", "./MuseV", "--n_batch", "1", "--target_datas", "jinkesi2", "--vision_clip_extractor_class_name", "ImageClipVisionFeatureExtractor", "--vision_clip_model_path", "./MuseV/checkpoints/IP-Adapter/models/image_encoder", "--motion_speed", "5.0", "--vae_model_path", "./MuseV/checkpoints/vae/sd-vae-ft-mse", "--time_size", "120", "--fps", "24"])
75
  return "./output.mp4"
76
 
 
 
 
77
  with gr.Blocks() as demo:
78
  title = gr.Markdown("""# MuseV Image2Vid & Vid2Vid """)
79
  subtitle1 = gr.Markdown("""Image2Vid""")
80
  image = gr.Image()
81
  button1 = gr.Button(value="Save Image")
82
- button1.click(fn=add_new_image,inputs=image)
83
  button2 = gr.Button(value="Generate Img2Vid")
84
  video = gr.Video()
85
  button2.click(fn=run,outputs=video)
86
  subtitle2 = gr.Markdown("""Vid2Vid""")
87
  video_in = gr.Video()
88
- button2 = gr.Button(value="Generate Vid2Vid")
 
 
89
  video_out = gr.Video()
90
- button2.click(fn=run,outputs=video_out)
91
-
92
-
93
 
94
  demo.launch()
 
74
  #subprocess.run(["python", "./MuseV/text2video.py", "--sd_model_name", "majicmixRealv6Fp16", "--unet_model_name", "musev_referencenet", "--referencenet_model_name", "musev_referencenet", "--ip_adapter_model_name", "musev_referencenet", "-test_data_path", "./MuseV/configs/tasks/example.yaml", "--output_dir", "./MuseV", "--n_batch", "1", "--target_datas", "jinkesi2", "--vision_clip_extractor_class_name", "ImageClipVisionFeatureExtractor", "--vision_clip_model_path", "./MuseV/checkpoints/IP-Adapter/models/image_encoder", "--motion_speed", "5.0", "--vae_model_path", "./MuseV/checkpoints/vae/sd-vae-ft-mse", "--time_size", "120", "--fps", "24"])
75
  return "./output.mp4"
76
 
77
+ def run_video():
78
+ subprocess.run(["python", "./MuseV/video2video.py", "--sd_model_name", "fantasticmix_v10", "--unet_model_name", "musev", "-test_data_path", "./MuseV/configs/tasks/example.yaml", "--output_dir", "./output", "--n_batch", "1", "--controlnet_name", "dwpose_body_hand", "--which2video" "\"video_middle\"", "--target_datas", "dance1", "--fps 12", "--time_size 12"])
79
+
80
  with gr.Blocks() as demo:
81
  title = gr.Markdown("""# MuseV Image2Vid & Vid2Vid """)
82
  subtitle1 = gr.Markdown("""Image2Vid""")
83
  image = gr.Image()
84
  button1 = gr.Button(value="Save Image")
85
+ button1.click(fn=add_new_image,inputs=[image])
86
  button2 = gr.Button(value="Generate Img2Vid")
87
  video = gr.Video()
88
  button2.click(fn=run,outputs=video)
89
  subtitle2 = gr.Markdown("""Vid2Vid""")
90
  video_in = gr.Video()
91
+ button3 = gr.Button(value="Save Video")
92
+ button3.click(fn=add_new_video,inputs=[video_in])
93
+ button4 = gr.Button(value="Generate Vid2Vid")
94
  video_out = gr.Video()
95
+ button4.click(fn=run_video,outputs=video_out)
 
 
96
 
97
  demo.launch()