add requirements and install

This commit is contained in:
FuouM
2024-07-28 17:44:27 +07:00
parent ae56332e46
commit 6d2ec54196
2 changed files with 40 additions and 1 deletions
+34
View File
@@ -0,0 +1,34 @@
import os
import shutil
# https://github.com/ltdrdata/ComfyUI-Impact-Pack/blob/Main/install.py
subpack_path = os.path.join(os.path.dirname(__file__), "Ezsynth")
subpack_repo = "https://github.com/FuouM/Ezsynth.git"
def ensure_subpack():
import git
if os.path.exists(subpack_path):
try:
repo = git.Repo(subpack_path)
repo.remotes.origin.pull()
except Exception as e:
print(e)
import platform
import traceback
traceback.print_exc()
if platform.system() == "Windows":
print(
f"[ComfyUI-EbSynth] Please turn off ComfyUI and remove '{subpack_path}' and restart ComfyUI."
)
else:
shutil.rmtree(subpack_path)
git.Repo.clone_from(subpack_repo, subpack_path)
else:
git.Repo.clone_from(subpack_repo, subpack_path)
if __name__ == "__main__":
ensure_subpack()
+6 -1
View File
@@ -1,2 +1,7 @@
numpy
cv2
torch
cv2
torchvision
phycv
scipy
Pillow