From 916916fae60b5eb2a147e66cc826a3b55bdca37f Mon Sep 17 00:00:00 2001 From: CasterPollux Date: Fri, 20 Jun 2025 21:51:56 -0700 Subject: [PATCH] fixes to dependencies --- README.md | 13 ++++++++++++- pyproject.toml | 25 ++++++++++++++++++++++--- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 207a1cf..4320c85 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ cd ComfyUI/custom_nodes git clone https://github.com/CasterPollux/MiniMax-Remover.git cd MiniMax-Remover +# Install with CUDA support (recommended) pip install -r requirements.txt ``` @@ -235,10 +236,20 @@ python download_models.py huggingface-cli download zibojia/minimax-remover --local-dir ./models ``` +#### **PyTorch CUDA Issues** +```bash +# If PyTorch gets downgraded to CPU version during installation: +# 1. Reinstall PyTorch with CUDA support first +pip install torch>=2.0.0,<2.8.0 torchvision>=0.15.0,<0.20.0 --index-url https://download.pytorch.org/whl/cu121 + +# 2. Then install other dependencies +pip install -r requirements.txt --no-deps --force-reinstall diffusers transformers accelerate +``` + #### **OpenCV Conflicts** ```bash # Install with compatible versions -pip install -r requirements_bmo.txt +pip install -r requirements.txt # If issues persist, see INSTALLATION_GUIDE_OPENCV_FIX.md ``` diff --git a/pyproject.toml b/pyproject.toml index 3b05dbd..d7c6056 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,21 @@ +# BMO MiniMax-Remover for ComfyUI +# +# IMPORTANT: This package requires PyTorch with CUDA support! +# +# For CUDA installation (recommended): +# pip install -r requirements.txt +# +# For manual CUDA installation: +# pip install torch>=2.0.0,<2.8.0 torchvision>=0.15.0,<0.20.0 --index-url https://download.pytorch.org/whl/cu121 +# pip install -e . + [build-system] requires = ["setuptools>=61.0", "wheel"] build-backend = "setuptools.build_meta" [project] name = "comfyui-minimax-remover" -description = "High-quality video object removal for ComfyUI using MiniMax optimization" +description = "High-quality video object removal for ComfyUI using MiniMax optimization. Requires PyTorch with CUDA support - install from requirements.txt for CUDA compatibility." version = "1.0.0" readme = "README.md" license = {file = "LICENSE"} @@ -26,8 +37,6 @@ classifiers = [ ] requires-python = ">=3.8" dependencies = [ - "torch>=2.0.0,<2.5.0", - "torchvision>=0.15.0,<0.20.0", "diffusers>=0.21.0", "transformers>=4.25.0", "numpy>=1.24.0", @@ -41,6 +50,16 @@ dependencies = [ "accelerate>=0.20.0" ] +[project.optional-dependencies] +cuda = [ + "torch>=2.0.0,<2.8.0", + "torchvision>=0.15.0,<0.20.0" +] +cpu = [ + "torch>=2.0.0,<2.8.0", + "torchvision>=0.15.0,<0.20.0" +] + [project.urls] Homepage = "https://github.com/YOUR_USERNAME/ComfyUI-MiniMax-Remover" Repository = "https://github.com/YOUR_USERNAME/ComfyUI-MiniMax-Remover"