Update app.py
Browse files
app.py
CHANGED
@@ -18,19 +18,20 @@ subprocess.run(["git", "clone", "https://huggingface.co/TMElyralab/MuseV", "./ch
|
|
18 |
os.chdir("..")
|
19 |
command = "\"import sys; sys.path.append('./MuseV/MuseV'); sys.path.append('./MuseV/MuseV/MMCM'); sys.path.append('./MuseV/MuseV/diffusers/src'); sys.path.append('./MuseV/MuseV/controlnet_aux/src')\""
|
20 |
subprocess.run(["python","-c",command])
|
21 |
-
subprocess.run(["mv", "./MuseV/scripts/inference/text2video.py", "./MuseV/text2video.py"])
|
22 |
-
subprocess.run(["mv", "./MuseV/scripts/inference/video2video.py", "./MuseV/video2video.py"])
|
23 |
|
24 |
-
with open ("./MuseV/text2video.py","r+") as scrip:
|
25 |
s = scrip.read()
|
26 |
-
s = s.replace("checkpoints/embedding/badhandv4.pt", "MuseV/checkpoints/embedding/badhandv4.pt")
|
27 |
-
s = s.replace("checkpoints/embedding/ng_deepnegative_v1_75t.pt", "MuseV/checkpoints/embedding/ng_deepnegative_v1_75t.pt")
|
28 |
-
s = s.replace("checkpoints/embedding/EasyNegativeV2.safetensors", "MuseV/checkpoints/embedding/EasyNegativeV2.safetensors")
|
29 |
-
s = s.replace("checkpoints/embedding/bad_prompt_version2-neg.pt", "MuseV/checkpoints/embedding/bad_prompt_version2-neg.pt")
|
30 |
scrip.write(s)
|
31 |
scrip.truncate()
|
32 |
scrip.seek(0)
|
33 |
|
|
|
|
|
|
|
34 |
with open ("./MuseV/configs/model/motion_model.py","r+") as scrip:
|
35 |
s = scrip.read()
|
36 |
s = s.replace('/content/MuseV/checkpoints', "/home/user/app/MuseV/checkpoints")
|
|
|
18 |
os.chdir("..")
|
19 |
command = "\"import sys; sys.path.append('./MuseV/MuseV'); sys.path.append('./MuseV/MuseV/MMCM'); sys.path.append('./MuseV/MuseV/diffusers/src'); sys.path.append('./MuseV/MuseV/controlnet_aux/src')\""
|
20 |
subprocess.run(["python","-c",command])
|
|
|
|
|
21 |
|
22 |
+
with open ("./MuseV/scripts/inference/text2video.py","r+") as scrip:
|
23 |
s = scrip.read()
|
24 |
+
s = s.replace("/checkpoints/embedding/badhandv4.pt", "/MuseV/checkpoints/embedding/badhandv4.pt")
|
25 |
+
s = s.replace("/checkpoints/embedding/ng_deepnegative_v1_75t.pt", "/MuseV/checkpoints/embedding/ng_deepnegative_v1_75t.pt")
|
26 |
+
s = s.replace("/checkpoints/embedding/EasyNegativeV2.safetensors", "/MuseV/checkpoints/embedding/EasyNegativeV2.safetensors")
|
27 |
+
s = s.replace("/checkpoints/embedding/bad_prompt_version2-neg.pt", "/MuseV/checkpoints/embedding/bad_prompt_version2-neg.pt")
|
28 |
scrip.write(s)
|
29 |
scrip.truncate()
|
30 |
scrip.seek(0)
|
31 |
|
32 |
+
subprocess.run(["mv", "./MuseV/scripts/inference/text2video.py", "./MuseV/text2video.py"])
|
33 |
+
subprocess.run(["mv", "./MuseV/scripts/inference/video2video.py", "./MuseV/video2video.py"])
|
34 |
+
|
35 |
with open ("./MuseV/configs/model/motion_model.py","r+") as scrip:
|
36 |
s = scrip.read()
|
37 |
s = s.replace('/content/MuseV/checkpoints', "/home/user/app/MuseV/checkpoints")
|