talalif commited on
Commit
8e1359f
·
verified ·
1 Parent(s): 56e5170

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -14
app.py CHANGED
@@ -49,7 +49,7 @@ def add_new_image(image):
49
  image = Image.fromarray(image)
50
  height = image.height
51
  width = image.width
52
- lr = height/width
53
  ip_img = "${.condition_images}"
54
  image.save("./img.png")
55
  img_settings = f"""- condition_images: ./img.png
@@ -60,7 +60,7 @@ def add_new_image(image):
60
  name: image
61
  prompt: (masterpiece, best quality, highres:1),(1person, solo:1),(eye blinks:1.8),(head wave:1.3)
62
  refer_image: {ip_img}
63
- video_path: ./final.mp4
64
  width: {width}"""
65
  print(img_settings)
66
  with open ("/home/user/app/MuseV/configs/tasks/example.yaml","r+") as configs:
@@ -68,23 +68,23 @@ def add_new_image(image):
68
  configs.truncate()
69
  configs.seek(0)
70
 
71
- def add_new_video(image):
72
  image = Image.fromarray(image)
73
  height = image.height
74
  width = image.width
75
- lr = height/width
76
  ip_img = "${.condition_images}"
77
  image.save("./img.png")
78
- img_settings = f"""- condition_images: ./img.png
79
- eye_blinks_factor: 1.8
80
- height: {height}
81
- img_length_ratio: {lr}
82
- ipadapter_image: {ip_img}
83
- name: image
84
- prompt: (masterpiece, best quality, highres:1),(1person, solo:1),(eye blinks:1.8),(head wave:1.3)
85
- refer_image: {ip_img}
86
- video_path: ./final.mp4
87
- width: {width}"""
88
  print(img_settings)
89
  with open ("/home/user/app/MuseV/configs/tasks/example.yaml","r+") as configs:
90
  configs.write(img_settings)
 
49
  image = Image.fromarray(image)
50
  height = image.height
51
  width = image.width
52
+ lr = 1.0
53
  ip_img = "${.condition_images}"
54
  image.save("./img.png")
55
  img_settings = f"""- condition_images: ./img.png
 
60
  name: image
61
  prompt: (masterpiece, best quality, highres:1),(1person, solo:1),(eye blinks:1.8),(head wave:1.3)
62
  refer_image: {ip_img}
63
+ video_path: null
64
  width: {width}"""
65
  print(img_settings)
66
  with open ("/home/user/app/MuseV/configs/tasks/example.yaml","r+") as configs:
 
68
  configs.truncate()
69
  configs.seek(0)
70
 
71
+ def add_new_video(video):
72
  image = Image.fromarray(image)
73
  height = image.height
74
  width = image.width
75
+ lr = 1.0
76
  ip_img = "${.condition_images}"
77
  image.save("./img.png")
78
+ img_settings = f"""- name: "dance2"
79
+ prompt: "(best quality), ((masterpiece)), (highres), illustration, original, extremely detailed wallpaper"
80
+ video_path: ./MuseV/data/source_video/video1_girl_poseseq.mp4
81
+ condition_images: ./MuseV/data/images/cyber_girl.png
82
+ refer_image: ${.condition_images}
83
+ ipadapter_image: ${.condition_images}
84
+ height: 960
85
+ width: 512
86
+ img_length_ratio: 1.0
87
+ video_is_middle: True """
88
  print(img_settings)
89
  with open ("/home/user/app/MuseV/configs/tasks/example.yaml","r+") as configs:
90
  configs.write(img_settings)