From 37edac88121f334dcad865603a6f1fd22c5c0cdc Mon Sep 17 00:00:00 2001 From: "Dr.Lt.Data" Date: Sun, 21 Apr 2024 00:10:48 +0900 Subject: [PATCH] update colab notebook - enhance dependencies install based on cm-cli.py - runtime permission fix to prevent conflict when git pull --- notebooks/comfyui_colab_with_manager.ipynb | 28 ++++++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/notebooks/comfyui_colab_with_manager.ipynb b/notebooks/comfyui_colab_with_manager.ipynb index 36bab4f..55ee514 100644 --- a/notebooks/comfyui_colab_with_manager.ipynb +++ b/notebooks/comfyui_colab_with_manager.ipynb @@ -50,11 +50,21 @@ "\n", "if OPTIONS['UPDATE_COMFY_UI']:\n", " !echo -= Updating ComfyUI =-\n", + "\n", + " # Correction of the issue of permissions being deleted on Google Drive.\n", + " ![ -f \".ci/nightly/update_windows/update_comfyui_and_python_dependencies.bat\" ] && chmod 755 .ci/nightly/update_windows/update_comfyui_and_python_dependencies.bat\n", + " ![ -f \".ci/nightly/windows_base_files/run_nvidia_gpu.bat\" ] && chmod 755 .ci/nightly/windows_base_files/run_nvidia_gpu.bat\n", + " ![ -f \".ci/update_windows/update_comfyui_and_python_dependencies.bat\" ] && chmod 755 .ci/update_windows/update_comfyui_and_python_dependencies.bat\n", + " ![ -f \".ci/update_windows_cu118/update_comfyui_and_python_dependencies.bat\" ] && chmod 755 .ci/update_windows_cu118/update_comfyui_and_python_dependencies.bat\n", + " ![ -f \".ci/update_windows/update.py\" ] && chmod 755 .ci/update_windows/update.py\n", + " ![ -f \".ci/update_windows/update_comfyui.bat\" ] && chmod 755 .ci/update_windows/update_comfyui.bat\n", + " ![ -f \".ci/update_windows/README_VERY_IMPORTANT.txt\" ] && chmod 755 .ci/update_windows/README_VERY_IMPORTANT.txt\n", + " ![ -f \".ci/update_windows/run_cpu.bat\" ] && chmod 755 .ci/update_windows/run_cpu.bat\n", + " ![ -f \".ci/update_windows/run_nvidia_gpu.bat\" ] && chmod 755 .ci/update_windows/run_nvidia_gpu.bat\n", + "\n", " !git pull\n", "\n", "!echo -= Install dependencies =-\n", - "#Remove cu121 as it causes issues in Colab.\n", - "#!pip install xformers!=0.0.18 -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu121 --extra-index-url https://download.pytorch.org/whl/cu118 --extra-index-url https://download.pytorch.org/whl/cu117\n", "!pip3 install accelerate\n", "!pip3 install einops transformers>=4.25.1 safetensors>=0.3.0 aiohttp pyyaml Pillow scipy tqdm psutil\n", "!pip3 install xformers!=0.0.18 torch==2.1.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121\n", @@ -62,6 +72,14 @@ "\n", "if OPTIONS['USE_COMFYUI_MANAGER']:\n", " %cd custom_nodes\n", + "\n", + " # Correction of the issue of permissions being deleted on Google Drive.\n", + " ![ -f \"ComfyUI-Manager/check.sh\" ] && chmod 755 ComfyUI-Manager/check.sh\n", + " ![ -f \"ComfyUI-Manager/scan.sh\" ] && chmod 755 ComfyUI-Manager/scan.sh\n", + " ![ -f \"ComfyUI-Manager/node_db/dev/scan.sh\" ] && chmod 755 ComfyUI-Manager/node_db/dev/scan.sh\n", + " ![ -f \"ComfyUI-Manager/scripts/install-comfyui-venv-linux.sh\" ] && chmod 755 ComfyUI-Manager/scripts/install-comfyui-venv-linux.sh\n", + " ![ -f \"ComfyUI-Manager/scripts/install-comfyui-venv-win.bat\" ] && chmod 755 ComfyUI-Manager/scripts/install-comfyui-venv-win.bat\n", + "\n", " ![ ! -d ComfyUI-Manager ] && echo -= Initial setup ComfyUI-Manager =- && git clone https://github.com/ltdrdata/ComfyUI-Manager\n", " %cd ComfyUI-Manager\n", " !git pull\n", @@ -69,9 +87,9 @@ "%cd $WORKSPACE\n", "\n", "if OPTIONS['INSTALL_CUSTOM_NODES_DEPENDENCIES']:\n", - " !pwd\n", " !echo -= Install custom nodes dependencies =-\n", - " ![ -f \"custom_nodes/ComfyUI-Manager/scripts/colab-dependencies.py\" ] && python \"custom_nodes/ComfyUI-Manager/scripts/colab-dependencies.py\"\n" + " !pip install GitPython\n", + " !python custom_nodes/ComfyUI-Manager/cm-cli.py restore-dependencies\n" ] }, { @@ -350,4 +368,4 @@ }, "nbformat": 4, "nbformat_minor": 0 -} +} \ No newline at end of file