From 6d2ec54196a4e86722e20f6ee3152e94eda8ed95 Mon Sep 17 00:00:00 2001 From: FuouM Date: Sun, 28 Jul 2024 17:44:27 +0700 Subject: [PATCH] add requirements and install --- install.py | 34 ++++++++++++++++++++++++++++++++++ requirements.txt | 7 ++++++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 install.py diff --git a/install.py b/install.py new file mode 100644 index 0000000..7d79f88 --- /dev/null +++ b/install.py @@ -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() diff --git a/requirements.txt b/requirements.txt index 5024afb..679dd40 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,7 @@ +numpy +cv2 torch -cv2 \ No newline at end of file +torchvision +phycv +scipy +Pillow \ No newline at end of file