-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update install_env.sh of Comfy #1170
Changes from 1 commit
75205c7
fcb1156
b8e0fa0
9c9e698
9315b2e
3fe3ce6
f6f2866
06e1fa6
ad385d6
8872c33
330b314
7f0fe0e
e04c0ae
80a7ad2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,10 +22,10 @@ if [ "$CI" = "1" ]; then | |
echo "Detected CI environment. Skipping local environment-specific dependencies." | ||
else | ||
echo "Detected local environment. Installing local environment-specific dependencies." | ||
pip install -r $CUSTOM_NODES/ComfyUI_InstantID/requirements.txt | ||
pip install -r $CUSTOM_NODES/PuLID_ComfyUI/requirements.txt | ||
python3 -m pip install --user -r $CUSTOM_NODES/ComfyUI_InstantID/requirements.txt | ||
python3 -m pip install --user -r $CUSTOM_NODES/PuLID_ComfyUI/requirements.txt | ||
fi | ||
|
||
echo "Installing common dependencies..." | ||
pip install websocket-client==1.8.0 numpy==1.26.4 scikit-image -i https://pypi.tuna.tsinghua.edu.cn/simple | ||
pip install nexfort | ||
python3 -m pip install --user websocket-client==1.8.0 numpy==1.26.4 scikit-image "huggingface_hub==0.25.0" "flash-attn==2.5.8" -i https://pypi.tuna.tsinghua.edu.cn/simple | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Make mirror URL configurable and add CUDA version check Based on the repository documentation and code analysis:
Suggested changes: +# Check CUDA version
+if ! command -v nvcc &> /dev/null; then
+ echo "Warning: NVCC not found. flash-attn requires CUDA (11.8, 12.1, or 12.2)"
+ exit 1
+fi
+
+# Allow mirror configuration
+PIP_MIRROR=${PIP_MIRROR:-"https://pypi.tuna.tsinghua.edu.cn/simple"}
+
-python3 -m pip install --user websocket-client==1.8.0 numpy==1.26.4 scikit-image "huggingface_hub==0.25.0" "flash-attn==2.5.8" -i https://pypi.tuna.tsinghua.edu.cn/simple
+python3 -m pip install --user websocket-client==1.8.0 numpy==1.26.4 scikit-image "huggingface_hub==0.25.0" "flash-attn==2.5.8" -i "$PIP_MIRROR" 🔗 Analysis chainConsider environment-specific mirror selection and verify CUDA compatibility. The script has two potential improvements:
Consider making the mirror URL configurable: -python3 -m pip install --user websocket-client==1.8.0 numpy==1.26.4 scikit-image "huggingface_hub==0.25.0" "flash-attn==2.5.8" -i https://pypi.tuna.tsinghua.edu.cn/simple
+PIP_MIRROR=${PIP_MIRROR:-"https://pypi.tuna.tsinghua.edu.cn/simple"}
+python3 -m pip install --user websocket-client==1.8.0 numpy==1.26.4 scikit-image "huggingface_hub==0.25.0" "flash-attn==2.5.8" -i "$PIP_MIRROR" Let's verify CUDA compatibility: Let me check if there are any CUDA requirements or compatibility notes in the repository documentation. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Check CUDA version and nvcc availability
if command -v nvcc &> /dev/null; then
echo "CUDA version:"
nvcc --version
else
echo "Warning: NVCC not found. flash-attn might not work without CUDA support"
fi
Length of output: 170 Script: #!/bin/bash
# Check for CUDA requirements in documentation
rg -i "cuda|gpu" README.md || echo "No CUDA/GPU mentions in README"
# Check for any installation requirements or prerequisites
fd "requirements|install" -e txt -e md -X cat {} || echo "No requirement files found"
# Look for any flash-attn related configuration or setup
rg -i "flash.?attn" -A 3 -B 3
Length of output: 4167 |
||
python3 -m pip install --user nexfort |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add error handling for requirements installation.
The requirements installation commands should include error handling to ensure the script fails gracefully if the requirements files are missing or if installations fail.
Consider this improvement:
📝 Committable suggestion