From 1d2e40904e4799ee7fb8bc32291e300a691dd378 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8C=AB=E5=A4=A7=E5=A5=BD=E3=81=8D?= Date: Tue, 22 Jul 2025 18:24:53 +0900 Subject: [PATCH] Add files via upload --- comfyui-builmenlabo/install.py | 113 +++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 comfyui-builmenlabo/install.py diff --git a/comfyui-builmenlabo/install.py b/comfyui-builmenlabo/install.py new file mode 100644 index 0000000..dd629f5 --- /dev/null +++ b/comfyui-builmenlabo/install.py @@ -0,0 +1,113 @@ +#!/usr/bin/env python3 +""" +ComfyUI BuimenLabo - Cross-platform Installation Script +Ensures reliable installation across Windows, macOS, and Linux +""" + +import subprocess +import sys +import os +import platform +from pathlib import Path + +def run_command(command, description, ignore_error=False): + """Run a command with error handling.""" + print(f"šŸ”„ {description}...") + try: + result = subprocess.run(command, shell=True, check=True, + capture_output=True, text=True) + print(f"āœ… {description} completed") + return True + except subprocess.CalledProcessError as e: + if ignore_error: + print(f"āš ļø {description} failed (continuing): {e}") + return False + else: + print(f"āŒ {description} failed: {e}") + if e.stdout: + print(f"stdout: {e.stdout}") + if e.stderr: + print(f"stderr: {e.stderr}") + return False + +def main(): + print("=" * 50) + print("šŸš€ ComfyUI BuimenLabo - Installation Script") + print("šŸ“ Blog: https://note.com/hirodream44") + print("=" * 50) + print() + + # Get Python executable + python_cmd = sys.executable + + print(f"šŸ Using Python: {python_cmd}") + print(f"šŸ–„ļø Platform: {platform.system()} {platform.release()}") + print() + + # Install core dependencies + core_deps = [ + "requests>=2.28.0", + "numpy>=1.21.0", + "Pillow>=9.0.0", + "psutil>=5.9.0" + ] + + print("šŸ“¦ Installing core dependencies...") + for dep in core_deps: + cmd = f'"{python_cmd}" -m pip install "{dep}"' + if not run_command(cmd, f"Installing {dep}", ignore_error=True): + print(f"āš ļø {dep} may already be installed or will be handled by ComfyUI") + + # Install Gemini API support + print("\nšŸ¤– Installing Gemini API support...") + gemini_cmd = f'"{python_cmd}" -m pip install "google-generativeai>=0.3.0"' + if not run_command(gemini_cmd, "Installing google-generativeai", ignore_error=True): + print("āš ļø Google Generative AI installation failed") + print(" You can install manually: pip install google-generativeai") + + # Llama-cpp-python information + print("\nšŸ¦™ Llama-CPP Python Setup Information:") + print(" āš ļø llama-cpp-python requires hardware-specific installation") + print(" šŸ”§ For optimal performance:") + print() + print(" šŸ–„ļø CPU only:") + print(f' "{python_cmd}" -m pip install llama-cpp-python') + print() + print(" šŸŽ® NVIDIA GPU (CUDA):") + print(' set CMAKE_ARGS="-DGGML_CUDA=on"') + print(f' "{python_cmd}" -m pip install llama-cpp-python --force-reinstall --no-cache-dir') + print() + print(" šŸŽ Apple Silicon (Metal):") + print(' export CMAKE_ARGS="-DGGML_METAL=on"') + print(f' "{python_cmd}" -m pip install llama-cpp-python --force-reinstall --no-cache-dir') + print() + print(" šŸ”“ AMD GPU (ROCm):") + print(' export CMAKE_ARGS="-DGGML_ROCM=on"') + print(f' "{python_cmd}" -m pip install llama-cpp-python --force-reinstall --no-cache-dir') + print() + + # Platform-specific instructions + if platform.system() == "Windows": + print("šŸ’” Windows users: Run install.bat for interactive installation") + + print("=" * 50) + print("āœ… Core installation completed!") + print("=" * 50) + print() + print("šŸ“‹ Next steps:") + print(" 1. Restart ComfyUI") + print(" 2. Look for BuimenLabo nodes in Add Node menu") + print(" 3. For LLM: Download GGUF models to ComfyUI/models/llm/") + print(" 4. For Gemini: Get API key from https://makersuite.google.com/app/apikey") + print(" 5. Check language toggle (🌐) in top-right corner") + print() + print("šŸ†˜ Troubleshooting:") + print(" • Language toggle missing → Refresh browser (F5)") + print(" • VRAM issues → Lower GPU layers in LLM nodes") + print(" • API errors → Check internet and API keys") + print() + print("šŸ“ Documentation: https://github.com/comnote-max/builmenlabo") + print("šŸ“– Blog: https://note.com/hirodream44") + +if __name__ == "__main__": + main() \ No newline at end of file