-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.py
84 lines (75 loc) · 6.89 KB
/
install.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import os
import sys
import subprocess
# Define the requirements for the extension
REQUIRED_PACKAGES = [
"gradio>=3.10.1",
"transparent-background==1.3.2",
"torch>=1.9.0",
"Pillow",
]
ASCII_ART = """
⣿⣿⣿⣿⣟⣿⣻⢿⡟⢿⡿⢿⣽⡌⣳⠀⠀⠀⠀⢻⢿⡷⢉⠛⠲⠶⠡⠀⢬⢅⠆⠤⢳⡄⠁⢆⠐⠈⢉⡙⢫⢟⡆⠀⠀⢈⠓⢉⢻⠀
⠹⣄⡀⢈⡋⠥⣉⠀⢌⡠⢉⠢⠙⣌⢒⣦⣐⣢⣀⣆⣤⣲⣌⣴⣰⣠⠄⠀⠀⠀⠀⠀⠁⠈⠑⢢⣶⣤⣦⣼⣦⣦⣼⣧⣶⣦⣾⣶⣶⠀
⣷⣶⣿⣶⣾⣷⣿⣿⣿⣿⡿⠋⠛⠛⠋⠉⠛⢿⣿⣿⣿⣿⣿⣿⡿⠃⠀⠀⠀⣀⣀⠀⠀⢀⠀⠀⠙⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀
⣿⣿⣿⣿⣿⣿⣿⣿⠟⠉⠀⠀⠀⠀⠀⠀⡀⠀⠈⠙⢿⣿⣿⣿⠃⠀⠀⢾⡹⣷⣿⣦⡄⠀⠠⠀⠀⠸⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⣿⠀
⣿⣿⣿⣿⣿⣿⣿⠏⠀⠀⠀⠀⠀⡰⣿⣿⣽⣷⣤⠀⠈⢿⣿⠏⠀⠀⠸⠒⠿⣞⠿⠿⠿⢆⠀⠂⠀⠀⠚⣿⣿⣿⣿⣿⣽⣷⣿⣿⣿⠀
⣿⣿⣿⣿⡿⡿⠏⠀⠀⠀⠀⠀⢴⡹⢾⣿⣿⣿⠿⠇⠀⠸⣿⡇⠀⠀⠀⠀⠈⣿⡀⠈⢍⣹⡆⠀⠀⢂⠀⠸⢿⣿⣿⣿⣿⣿⣿⣿⣿⠀
⣿⣿⣿⣿⣻⠟⠀⠀⠀⠀⠀⠰⠠⠐⢂⢀⢻⠷⠀⢉⡀⠀⢫⠁⠀⠘⡶⡞⠠⣿⣿⠻⣿⣿⣏⠀⠀⠀⠀⠀⢸⣽⣿⣿⣿⣿⣿⣿⣿⠀
⠛⢿⣿⠗⠩⠄⠀⠀⠀⠀⠀⠉⢷⣶⣾⡾⡍⣿⡿⢿⣷⠀⠸⡇⡀⠀⢨⠀⠂⢀⣚⡃⢈⣿⡏⠠⠀⠀⠀⠁⢂⢙⢻⣿⣿⣿⣿⣿⣿⠀
⠀⡠⠠⢍⠁⠀⠀⠀⠀⠀⠀⠈⠌⢻⠟⠦⠤⠜⠞⢊⡏⠀⠸⣯⠠⠀⠀⠂⣄⢒⣴⣿⡾⢏⡁⠀⠀⠀⠀⠀⠁⠹⢸⣿⣿⣿⣿⣿⣿⠀
⠀⢡⠜⠇⠀⠀⠀⠀⠀⠀⠀⠀⠈⡍⢶⡤⣉⠚⣣⡿⠁⠀⣿⣿⣷⡀⠀⠀⠈⠛⢛⢫⡾⣹⠆⠀⠀⠀⡀⠀⠀⠀⠠⢪⣿⣿⣿⣿⣿⠀
⠘⢦⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠌⠘⠻⠿⠟⠀⠀⢠⣻⣿⣿⣷⣤⠀⠀⠀⡘⠦⡹⣽⣻⣴⢦⡤⢄⣤⢤⢤⣤⣅⢿⣿⣿⣿⣿⠀
⣾⠗⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠐⡴⣢⣭⢿⡝⠀⠀⢀⠤⣿⠛⠍⡀⢱⠃⠀⠐⣀⠣⣕⢺⣱⣝⣴⣿⢣⣞⢯⣞⣿⣿⣷⡹⣿⣿⣿⠀
⡿⣹⠠⠀⢀⣀⣄⣤⣒⡶⡜⣶⣹⢶⣽⣾⣿⣅⣀⠠⣌⡿⠃⠈⢀⠔⡀⠀⠄⡇⢆⡰⣏⣿⣹⢿⣿⣿⣿⣾⣷⣾⣿⣿⣿⣿⣻⣿⣿⠀
⣿⠏⢄⠺⡽⣿⣿⣿⣿⣿⣿⣶⣿⣯⣿⣿⡿⣾⣼⣫⢻⣷⡁⠀⠎⠠⠀⠄⡘⡘⢦⣛⠾⣱⣫⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣏⣿⣿⠀
⣾⠎⣀⠲⣉⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⣟⣮⢇⠀⠈⢄⠩⡐⠴⣉⠶⡩⢎⡱⣏⣾⣿⣿⣿⣿⣿⣏⠜⣯⣷⡿⣽⢿⣿⠀
⡿⢀⠢⡑⢮⡙⣞⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣾⣄⠈⢦⠳⣍⠞⡌⢣⠱⣏⡵⣿⣿⣿⣿⣿⣿⣿⡅⠀⢏⣿⣻⣽⣾⣿⠀
⡇⠀⢆⡙⢦⠍⠀⠘⢧⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣽⣎⢼⣛⣮⡟⠠⡁⣞⡴⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠈⢖⡿⣯⣧⣿⠀
⠀⠌⠰⣘⢧⠋⠀⠀⠀⢋⡾⣿⣿⣿⣿⣿⣿⣿⣟⣿⣿⣿⣿⣿⣿⣷⡽⣿⠇⢠⡱⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⠀⠀⠌⢺⣿⣿⣹⠀
⠠⡈⠵⣩⠂⠁⠀⡐⢈⡐⣟⣿⣿⣿⣿⣿⣿⣿⣿⣟⡡⢿⣿⣿⣿⣿⡯⠙⠀⢆⡿⣽⡟⢭⣻⣿⣿⣿⣿⣿⣿⡇⠀⢠⠈⢂⠿⣿⡿⠀
⢠⡙⡼⡁⠀⠀⠀⠐⡀⠐⢎⡿⣿⣿⡟⠜⠾⣿⣿⣿⡆⢹⣻⣿⣿⣿⣯⠁⠀⠘⡼⣃⠀⠂⣿⣿⣿⣿⣿⣿⣿⠀⡱⡜⡆⠈⢞⡽⣿⠀
⢠⣛⠖⠅⠀⠀⠀⠀⡐⠈⠠⠙⡽⣻⣿⣄⣒⣽⣿⡿⣿⡄⠘⢿⣿⣿⡟⠀⠀⠈⠰⠩⡗⣿⣿⣿⣿⢿⣽⣿⡟⣰⣻⣶⣿⡈⢜⡲⢹⠀
⢢⠍⣜⠊⠀⠀⠀⠀⠠⢁⠂⡁⠐⡉⠞⡻⢿⠿⣛⣿⣿⣿⡄⠈⠘⠁⠀⡀⠂⠠⠀⠁⠈⠐⣉⣬⣵⣿⣿⡿⠵⢔⣿⣿⣿⣧⠈⢿⣡⠀
⠂⣼⡳⠡⠀⠀⠀⠠⠀⠂⠄⣑⢦⡠⣤⣴⣶⣾⣿⣿⣿⣿⣿⣦⠀⠀⠠⢈⡁⠀⠡⠙⣾⣹⣞⣧⡿⣿⣿⣧⠒⣽⣿⣿⣿⣿⣷⡀⢣⠀
⣇⣿⣧⣌⣠⣅⠧⠀⡀⢈⠰⡈⠦⡝⡶⣭⣿⣿⣿⣿⣿⣿⡿⡙⣆⠀⠀⢂⠐⠠⠁⠈⠄⢫⣟⡿⣽⣻⣿⣷⣾⣿⣿⣿⣿⣿⣿⣿⣄⠀
⣯⣿⣿⣽⣾⣿⣶⣽⠇⢀⠢⣑⢻⠲⣍⢯⢻⡽⣯⣿⣿⡳⡇⣹⣿⠆⠀⠀⠌⡐⠈⡐⢄⠂⢌⡱⢿⣿⣿⣿⣿⣯⢿⣿⣿⣿⣿⣿⣿⠀
⣿⣽⣿⣿⣿⣿⣿⢋⢢⡀⢵⣊⢧⡻⣜⢮⣳⣻⣽⣟⢾⣳⢁⣿⣿⡆⠀⠀⠐⡠⠐⠠⣊⣝⠢⡌⢣⢟⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀
⣿⡧⣿⣿⣿⡿⢁⢎⢶⣙⠶⣽⣯⣿⣽⣳⢿⣿⣿⣞⣯⢷⢨⣿⣿⠃⠀⠀⠠⢑⠂⢀⠓⣎⠻⡄⢃⠎⡿⣿⣿⣿⣿⡓⠹⣿⣿⣿⣿⠀
⢺⣿⣹⣿⠏⠠⠐⠊⢷⣫⢿⣽⣿⣻⢾⡽⣿⣿⣯⣼⣟⠯⡰⣻⣿⠀⠀⠀⠀⠀⡁⠂⠉⡌⠓⡄⠂⠌⡱⢫⢿⣟⡇⠚⠧⠹⣿⣿⣿⠀
⠀⢿⣏⠋⠀⠀⠸⠴⠀⠍⡛⢿⣳⢯⣛⠾⣝⢯⣟⣟⢮⠃⠁⣿⡿⠀⠀⠀⠀⠀⠀⢀⠁⠄⢃⠐⠈⠀⣃⠨⡰⡣⣜⣲⠀⢜⣙⣿⣿⠀
⡈⠆⣿⣆⠮⠵⠃⠜⡪⣏⠛⣳⠨⣅⣫⠙⢊⡧⢙⠈⡃⢠⠖⢽⡧⠠⢁⡈⠁⠀⠀⢀⣤⢀⢐⡠⠀⠙⢛⠌⢀⣿⠟⣯⣴⣿⣿⡿⣿⠀
⣧⢈⠼⣿⣦⡒⣤⣐⣸⢼⣁⣉⣐⠿⠈⡳⠅⠰⡅⢁⢶⠟⠒⢿⣧⠀⠈⠐⠑⠠⠔⠈⡀⢀⣩⠭⠡⠀⡘⠀⠀⢀⣈⡽⣿⣿⣿⣿⣿⠀
⣿⠀⠺⣽⣿⢿⡰⣌⢯⡝⡬⠢⠁⠀⡊⣉⠀⠈⠛⢍⣭⣟⡷⢸⡯⠀⢀⠢⡐⣀⠀⠀⠀⠀⠁⠁⠀⠀⢀⠰⣘⣦⢷⣿⣿⣿⣿⣿⣿⠀
⣿⠂⡵⠺⣽⠑⣗⢽⣻⣿⣽⣭⠀⣆⡔⠾⡰⢐⢶⣯⣷⣯⢿⣼⣷⠀⠀⠦⣑⠦⡱⢀⠀⠀⠀⠀⠀⡐⡬⢯⣽⣾⣿⣿⣿⣿⣿⣿⣻⠀
⣷⠀⢈⡄⣾⠀⢥⣚⣿⣿⣿⣯⣷⠈⠀⢀⡴⣫⣾⢿⣷⣿⡿⣴⡷⠀⠈⠲⣍⠞⡥⢃⠂⠀⠀⠀⢠⠱⣽⣻⣿⣿⣿⣿⣿⣿⣿⢷⣿⠀
⣿⡄⠀⠃⠘⡆⣈⡟⣾⢿⣿⣿⣿⣇⠀⠮⣜⢷⣯⢿⣿⣿⣿⣹⣇⠀⠀⠓⣌⠛⠤⠁⠀⠀⠀⣀⢣⣛⣾⣿⣿⣿⣿⣿⣿⣿⢟⣾⣿⠀
⢿⣳⠀⠈⠀⠇⠼⡸⣝⣿⣿⣿⣿⣿⠀⠳⣘⢯⡞⣿⣿⣿⣷⠹⡿⠀⠀⠑⠨⠌⢀⠀⠀⠀⠠⣐⢧⣻⣾⣿⣿⣿⣿⣿⡿⢏⣾⣿⣿⠀
⣾⣿⣗⠀⠈⢠⢃⡓⠾⣼⣻⣿⣿⣿⠃⠠⠉⢖⡛⣛⣻⣛⡋⢀⣭⡄⠀⠀⠄⠂⠀⠀⠀⠀⡰⣉⠞⣻⣟⣿⣛⣿⣿⠛⠩⢸⣩⣯⣽⠀
"""
def install_package(package):
"""Installs a single package using pip."""
print(f"\033[94m[*] Installing {package}...\033[0m")
try:
subprocess.check_call([sys.executable, "-m", "pip", "install", package])
print(f"\033[92m[+] Successfully installed {package}.\033[0m")
except subprocess.CalledProcessError:
print(f"\033[91m[!] Failed to install {package}. Please try manually.\033[0m")
def main():
"""Installs all required packages."""
print("\033[95m" + "=" * 60)
print(" " * 12 + "✨ VFX Workflow Extension Installer ✨")
print("=" * 60 + "\033[0m")
print(ASCII_ART)
print("\033[94mThis script will install all required dependencies for the extension.\033[0m\n")
print("\033[92mRequirements:\033[0m")
for package in REQUIRED_PACKAGES:
print(f" ➡ {package}")
print("\n\033[93m[*] Starting installation...\033[0m\n")
for package in REQUIRED_PACKAGES:
install_package(package)
print("\n\033[92m[+] All dependencies have been installed successfully!\033[0m")
print("\033[94mYou can now launch the Stable Diffusion WebUI and use the extension.\033[0m")
print("\033[95m" + "=" * 60 + "\033[0m")
if __name__ == "__main__":
main()