Update app.py
Browse files
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 =
|
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:
|
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(
|
72 |
image = Image.fromarray(image)
|
73 |
height = image.height
|
74 |
width = image.width
|
75 |
-
lr =
|
76 |
ip_img = "${.condition_images}"
|
77 |
image.save("./img.png")
|
78 |
-
img_settings = f"""-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
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)
|