Download comfyui_segment_anything/install.py from thisisAce/runpod_custom_nodes: direct link, hf CLI and curl.
- Browser
- Download file 549 Bytes
-
https://huggingface.co/thisisAce/runpod_custom_nodes/resolve/main/comfyui_segment_anything/install.py
- Command line
-
hf download hf://thisisAce/runpod_custom_nodes/comfyui_segment_anything/install.py
-
curl -L -o install.py https://huggingface.co/thisisAce/runpod_custom_nodes/resolve/main/comfyui_segment_anything/install.py
549 Bytes
| import sys | |
| import os.path | |
| import subprocess | |
| custom_nodes_path = os.path.dirname(os.path.abspath(__file__)) | |
| def build_pip_install_cmds(args): | |
| if "python_embeded" in sys.executable or "python_embedded" in sys.executable: | |
| return [sys.executable, '-s', '-m', 'pip', 'install'] + args | |
| else: | |
| return [sys.executable, '-m', 'pip', 'install'] + args | |
| def ensure_package(): | |
| cmds = build_pip_install_cmds(['-r', 'requirements.txt']) | |
| subprocess.run(cmds, cwd=custom_nodes_path) | |
| if __name__ == "__main__": | |
| ensure_package() | |