From a400e36eb73d1df81d58b110475233915084439f Mon Sep 17 00:00:00 2001 From: CasterPollux Date: Fri, 20 Jun 2025 21:33:25 -0700 Subject: [PATCH] removing old files --- README_ComfyUI_BMO.md | 124 ------------------------------------------ check_cuda.py | 8 --- requirements_bmo.txt | 29 ---------- 3 files changed, 161 deletions(-) delete mode 100644 README_ComfyUI_BMO.md delete mode 100644 check_cuda.py delete mode 100644 requirements_bmo.txt diff --git a/README_ComfyUI_BMO.md b/README_ComfyUI_BMO.md deleted file mode 100644 index dff1c4a..0000000 --- a/README_ComfyUI_BMO.md +++ /dev/null @@ -1,124 +0,0 @@ -# MiniMax-Remover BMO - ComfyUI Integration - -πŸŽ‰ **High-Quality Video Object Removal** - -This is the **BMO** implementation of MiniMax-Remover for ComfyUI that delivers natural, high-quality inpainting results. Based on the official MiniMax-Remover implementation with proper VAE normalization and dimension handling. - -## πŸ”₯ Key Features - -- βœ… **Proper VAE Normalization**: Uses official `latents_mean` and `latents_std` from VAE config -- βœ… **Optimized Scheduler**: Properly configured UniPCMultistepScheduler for flow prediction -- βœ… **Dimension Compatibility**: Perfect VAE output vs transformer input alignment -- βœ… **Official Parameters**: Uses optimal defaults (12 steps, 6 iterations) -- βœ… **Natural Results**: Produces solid, realistic inpainting with clean edges - -## πŸ“₯ Installation - -***CLONE THE REPO*** - -### Method 1: Automatic Setup (Recommended) - -1. Run the setup script: this will move all the files you need directly into you comfy ui custom nodes section for you. -```bash -python setup_comfyui_integration_bmo.py -``` - -2. Follow the prompts to specify your ComfyUI path -3. Restart ComfyUI completely - -### Method 2: Manual Installation - -1. Copy these files to your ComfyUI custom_nodes directory: -``` -ComfyUI/custom_nodes/minimax-remover-bmo/ -β”œβ”€β”€ __init__.py -β”œβ”€β”€ minimax_mask_node_bmo.py -β”œβ”€β”€ pipeline_minimax_remover_bmo.py -└── transformer_minimax_remover.py -└──Models - β”œβ”€β”€ vae/ - β”‚ β”œβ”€β”€ config.json - β”‚ └── diffusion_pytorch_model.safetensors - β”œβ”€β”€ transformer/ - β”‚ β”œβ”€β”€ config.json - β”‚ └── diffusion_pytorch_model.safetensors - └── scheduler/ - └── scheduler_config.json - -``` - -2. Restart ComfyUI - -## πŸš€ Usage - -### In ComfyUI: - -1. **Add the node**: Look for "MiniMax-Remover (BMO)" in the MiniMax-Remover category - -2. **Connect inputs**: - - `images`: Your video frames as IMAGE type - - `masks`: Your binary masks as MASK type - -3. **Set parameters**: - - `num_inference_steps`: 12 (official default, good quality/speed balance) - - `iterations`: 6 (mask expansion iterations, official default) - - `seed`: Any number for reproducible results - - `model_path`: Path to your MiniMax models (default: "models/") - -4. **Run**: The output will be clean, natural-looking inpainting! - -### Model Setup (also shown above with main files) - -Place your MiniMax-Remover models in the same custom nodes section as your main files from installation above: -``` -ComfyUI/custom_nodes/minimax-remover-bmo/models -β”œβ”€β”€ vae/ -β”‚ β”œβ”€β”€ config.json -β”‚ └── diffusion_pytorch_model.safetensors -β”œβ”€β”€ transformer/ -β”‚ β”œβ”€β”€ config.json -β”‚ └── diffusion_pytorch_model.safetensors -└── scheduler/ - └── scheduler_config.json -``` - -## πŸ“Š Performance - -- **Processing Time**: ~1-2 seconds for 5 frames at 288x528 -- **Memory Usage**: Efficient with proper tensor management -- **Quality**: Natural, solid inpainting results - -## πŸ› Troubleshooting - -### Poor quality results: -- Ensure you're using the BMO node (latest version) -- Try different seeds -- Adjust mask expansion (iterations parameter) - -### Memory issues: -- Use smaller input resolutions -- Enable model offloading in ComfyUI - -## πŸ“ Example Workflow - -1. **Load Video**: Use VHS nodes to load your input video -2. **Create Masks**: Use masking tools or load pre-made masks -3. **Process**: Connect to "MiniMax-Remover (BMO)" node -4. **Output**: Save or preview the cleaned video - -## 🎯 Best Practices - -- **Resolution**: Works best with resolutions divisible by 16 -- **Mask Quality**: Clean, binary masks work best -- **Iterations**: 6-10 for most cases, higher for larger objects -- **Steps**: 12 is optimal, 8-20 range depending on quality needs - -## πŸ”— Links - -- [Original MiniMax-Remover Paper](https://arxiv.org/abs/2412.09940) -- [Official Implementation](https://github.com/miraikan-research/MiniMax-Remover) -- [ComfyUI](https://github.com/comfyanonymous/ComfyUI) - ---- - -**Happy inpainting!** 🎨✨ diff --git a/check_cuda.py b/check_cuda.py deleted file mode 100644 index 44111dc..0000000 --- a/check_cuda.py +++ /dev/null @@ -1,8 +0,0 @@ -import torch - -print("βœ… CUDA available:", torch.cuda.is_available()) - -if torch.cuda.is_available(): - print("πŸš€ GPU:", torch.cuda.get_device_name(0)) -else: - print("οΏ½οΏ½ Running on CPU") \ No newline at end of file diff --git a/requirements_bmo.txt b/requirements_bmo.txt deleted file mode 100644 index 5063ce2..0000000 --- a/requirements_bmo.txt +++ /dev/null @@ -1,29 +0,0 @@ -# BMO MiniMax-Remover Requirements for ComfyUI -# High-quality video object removal dependencies - -# NOTE: Install PyTorch with CUDA support first: -# pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121 - -# Core ML/AI Libraries -diffusers>=0.28.0 -transformers>=4.40.0 -accelerate>=0.21.0 - -# Tensor Operations -einops>=0.7.0 -scipy>=1.11.0 - -# Image/Video Processing -numpy>=1.24.0 -opencv-python>=4.8.0 -pillow>=10.0.0 - -# Utilities -tqdm>=4.65.0 - -# Optional (for enhanced functionality) -xformers # For memory efficiency (optional) -bitsandbytes # For model quantization (optional) - -# Note: ComfyUI should already provide most of these dependencies -# This file ensures compatibility for standalone usage \ No newline at end of file