kira-loras / debug_nodes.sh
Hammerthyme's picture
Upload debug_nodes.sh with huggingface_hub
896efbd verified
Raw History Blame Contribute Delete
1.01 kB
#!/bin/bash
# Debug why custom nodes are failing to import
cd /workspace/ComfyUI/custom_nodes
for node in rgthree-comfy ComfyUI-Easy-Use ComfyUI-KJNodes ComfyUI-AdvancedLivePortrait ComfyUI-Florence2 ComfyUI-Impact-Pack comfyui_controlnet_aux; do
echo "========================================"
echo "Testing: $node"
echo "========================================"
cd "/workspace/ComfyUI/custom_nodes/$node"
# Install requirements if they exist
if [ -f requirements.txt ]; then
echo ">>> Installing requirements"
pip install -q -r requirements.txt 2>&1 | tail -5
fi
# Try to actually import the module to see the error
cd /workspace/ComfyUI
python3 -c "import sys; sys.path.insert(0, 'custom_nodes/$node'); import importlib.util; spec = importlib.util.spec_from_file_location('test_module', 'custom_nodes/$node/__init__.py'); m = importlib.util.module_from_spec(spec); spec.loader.exec_module(m); print(' OK imported')" 2>&1 | tail -10
echo ""
done