diff --git a/.github/workflows/package_wheels.yml b/.github/workflows/package_wheels.yml index 0044829..9f68138 100644 --- a/.github/workflows/package_wheels.yml +++ b/.github/workflows/package_wheels.yml @@ -35,7 +35,7 @@ jobs: - name: 📦 Building and Bundling wheels shell: bash run: | - python -m pip wheel --no-cache-dir -r requirements-wheels.txt -w ./wheels 2>&1 | tee build.log + python -m pip wheel --no-cache-dir -r reqs.txt -w ./wheels 2>&1 | tee build.log # find source wheels packages=$(cat build.log | awk -F 'Building wheels for collected packages: ' '{print $2}') diff --git a/INSTALL-CN.md b/INSTALL-CN.md index 934e540..32ef707 100644 --- a/INSTALL-CN.md +++ b/INSTALL-CN.md @@ -49,7 +49,7 @@ python scripts/download_models.py 1. 确保您处于用于 ComfyUI 的 Python 环境中。 2. 运行以下命令安装所需的依赖项: ```bash - pip install -r comfy_mtb/requirements.txt + pip install -r comfy_mtb/reqs.txt ``` @@ -77,7 +77,7 @@ python scripts/download_models.py !python custom_nodes/comfy_mtb/scripts/download_models.py -y # install the dependencies -!pip install -r custom_nodes/comfy_mtb/requirements.txt -f https://download.openmmlab.com/mmcv/dist/cu118/torch2.0/index.html +!pip install -r custom_nodes/comfy_mtb/reqs.txt -f https://download.openmmlab.com/mmcv/dist/cu118/torch2.0/index.html ``` 如果运行后 colab 抱怨需要重新启动运行时,请重新启动,然后不要重新运行之前的单元格,只运行运行本地隧道的单元格。(可能需要先添加一个包含 `%cd ComfyUI` 的单元格) diff --git a/INSTALL-JP.md b/INSTALL-JP.md index f06dc6f..c7c3f52 100644 --- a/INSTALL-JP.md +++ b/INSTALL-JP.md @@ -52,7 +52,7 @@ python scripts/download_models.py 1. ComfyUIで使用しているPython環境であることを確認してください。 2. 以下のコマンドを実行して、必要な依存関係をインストールします: ```bash - pip install -r comfy_mtb/requirements.txt + pip install -r comfy_mtb/reqs.txt ``` @@ -78,7 +78,7 @@ ComfyUI with localtunnel (Recommended Way)**ヘッダーのすぐ後(コード !python custom_nodes/comfy_mtb/scripts/download_models.py -y # install the dependencies -!pip install -r custom_nodes/comfy_mtb/requirements.txt -f https://download.openmmlab.com/mmcv/dist/cu118/torch2.0/index.html +!pip install -r custom_nodes/comfy_mtb/reqs.txt -f https://download.openmmlab.com/mmcv/dist/cu118/torch2.0/index.html ``` これを実行した後、colabがランタイムを再起動する必要があると文句を言ったら、それを実行し、それ以前のセルは再実行せず、localtunnelを実行するセルだけを再実行してください。(最初に`%cd ComfyUI`のセルを追加する必要があるかもしれません...) diff --git a/INSTALL.md b/INSTALL.md index 2bf392d..e3f7d65 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -48,7 +48,7 @@ On first run the script [tries to symlink](https://github.com/melMass/comfy_mtb/ 1. Make sure you are in the Python environment you use for ComfyUI. 2. Install the required dependencies by running the following command: ```bash - pip install -r comfy_mtb/requirements.txt + pip install -r comfy_mtb/reqs.txt ``` @@ -76,7 +76,7 @@ Add a new code cell just after the **Run ComfyUI with localtunnel (Recommended W !python custom_nodes/comfy_mtb/scripts/download_models.py -y # install the dependencies -!pip install -r custom_nodes/comfy_mtb/requirements.txt -f https://download.openmmlab.com/mmcv/dist/cu118/torch2.0/index.html +!pip install -r custom_nodes/comfy_mtb/reqs.txt -f https://download.openmmlab.com/mmcv/dist/cu118/torch2.0/index.html ``` If after running this, colab complains about needing to restart runtime, do it, and then do not rerun earlier cells, just the one to run the localtunnel. (you might have to add a cell with `%cd ComfyUI` first...) diff --git a/install.py b/install.py index de08916..04108e4 100644 --- a/install.py +++ b/install.py @@ -258,23 +258,16 @@ def import_or_install(requirement, dry=False): # Install dependencies from requirements.txt def install_dependencies(dry=False): - parsed_requirements = get_requirements(here / "requirements.txt") + parsed_requirements = get_requirements(here / "reqs.txt") if not parsed_requirements: return print_formatted( - "Installing dependencies from requirements.txt...", "italic", color="yellow" + "Installing dependencies from reqs.txt...", "italic", color="yellow" ) for requirement in parsed_requirements: import_or_install(requirement, dry=dry) - if mode == "venv": - parsed_requirements = get_requirements(here / "requirements-wheels.txt") - if not parsed_requirements: - return - for requirement in parsed_requirements: - import_or_install(requirement, dry=dry) - if __name__ == "__main__": full = False @@ -328,7 +321,6 @@ def install_dependencies(dry=False): # Install dependencies from requirements.txt # if args.requirements or mode == "venv": - install_dependencies(dry=args.dry) if (not args.wheels and mode not in ["colab", "embeded"]) and not full: print_formatted( @@ -336,6 +328,8 @@ def install_dependencies(dry=False): "italic", color="yellow", ) + + install_dependencies(dry=args.dry) sys.exit() if mode in ["colab", "embeded"]: @@ -349,7 +343,7 @@ def install_dependencies(dry=False): # - Check the env before proceeding. missing_wheels = False - parsed_requirements = get_requirements(here / "requirements-wheels.txt") + parsed_requirements = get_requirements(here / "reqs.txt") if parsed_requirements: for requirement in parsed_requirements: installed, pip_name, import_name = try_import(requirement) @@ -359,7 +353,7 @@ def install_dependencies(dry=False): if not missing_wheels: print_formatted( - f"All required wheels are already installed.", "italic", color="green" + f"All requirements are already installed.", "italic", color="green" ) sys.exit() @@ -408,7 +402,7 @@ def install_dependencies(dry=False): ) wheels_directory.mkdir(exist_ok=True) - + # - Install the wheels for asset in matching_assets: asset_name = asset["name"] asset_download_url = asset["browser_download_url"] @@ -487,3 +481,6 @@ def install_dependencies(dry=False): print_formatted("Wheels installation completed.", color="green") else: print_formatted("No .whl files found. Nothing to install.", color="yellow") + + # - Install all remainings + install_dependencies(dry=args.dry) diff --git a/requirements.txt b/reqs.txt similarity index 91% rename from requirements.txt rename to reqs.txt index 3fc5e65..2d60329 100644 --- a/requirements.txt +++ b/reqs.txt @@ -12,3 +12,6 @@ protobuf==3.20.2; platform_system == "Windows" gdown @ git+https://github.com/melMass/gdown@main mmdet==3.0.0 facexlib==0.3.0 +insightface==0.7.3 +mmcv==2.0.0 +basicsr==1.4.2 diff --git a/requirements-wheels.txt b/requirements-wheels.txt deleted file mode 100644 index af6449d..0000000 --- a/requirements-wheels.txt +++ /dev/null @@ -1,3 +0,0 @@ -insightface==0.7.3 -mmcv==2.0.0 -basicsr==1.4.2