You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upon running ComfyUI I'm getting this error: "OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root."
This is on Linux Mint, but I got the same issue when trying previously on Windows 10. I tried reinstalling the python "torch" module, as it seems to be responsible for installing CUDA if I'm not mistaken. I tried installing torch with both commands provided in the ComfyUI repo for both stable and nightly, but none fixed the issue:
Traceback (most recent call last):
File "/home/charlie/projects/ComfyUI/nodes.py", line 1888, in load_custom_node
module_spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/home/charlie/projects/ComfyUI/custom_nodes/human-parser-comfyui-node/__init__.py", line 1, in <module>
from .HumanParserLIPCustomNode import HumanParserLIPCustomNode
File "/home/charlie/projects/ComfyUI/custom_nodes/human-parser-comfyui-node/HumanParserLIPCustomNode.py", line 5, in <module>
from .utils import generate
File "/home/charlie/projects/ComfyUI/custom_nodes/human-parser-comfyui-node/utils.py", line 8, in <module>
from .schp import networks
File "/home/charlie/projects/ComfyUI/custom_nodes/human-parser-comfyui-node/schp/networks/__init__.py", line 3, in <module>
from .AugmentCE2P import resnet101
File "/home/charlie/projects/ComfyUI/custom_nodes/human-parser-comfyui-node/schp/networks/AugmentCE2P.py", line 21, in <module>
from ..modules import InPlaceABNSync
File "/home/charlie/projects/ComfyUI/custom_nodes/human-parser-comfyui-node/schp/modules/__init__.py", line 1, in <module>
from .bn import ABN, InPlaceABN, InPlaceABNSync
File "/home/charlie/projects/ComfyUI/custom_nodes/human-parser-comfyui-node/schp/modules/bn.py", line 10, in <module>
from .functions import *
File "/home/charlie/projects/ComfyUI/custom_nodes/human-parser-comfyui-node/schp/modules/functions.py", line 12, in <module>
_backend = load(name="inplace_abn",
File "/home/charlie/projects/ComfyUI/venv/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1309, in load
return _jit_compile(
File "/home/charlie/projects/ComfyUI/venv/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1719, in _jit_compile
_write_ninja_file_and_build_library(
File "/home/charlie/projects/ComfyUI/venv/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1809, in _write_ninja_file_and_build_library
extra_ldflags = _prepare_ldflags(
File "/home/charlie/projects/ComfyUI/venv/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1901, in _prepare_ldflags
if (not os.path.exists(_join_cuda_home(extra_lib_dir)) and
File "/home/charlie/projects/ComfyUI/venv/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 2419, in _join_cuda_home
raise OSError('CUDA_HOME environment variable is not set. '
OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.
Cannot import /home/charlie/projects/ComfyUI/custom_nodes/human-parser-comfyui-node module for custom nodes: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.
Ok so for some reason the CUDA_HOME env var isn't set by the cuda install process in your scenario, but it is required for loading CPP extensions like our node does.
I think this thread might clear some things up: conda/conda#7757
It's a simple case of pointing the CUDA_HOME var to your CUDA homedir, but I'm not really sure where that is for you.
I'd also check if cudatoolkit is installed, and try installing it if not.
Upon running ComfyUI I'm getting this error: "OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root."
This is on Linux Mint, but I got the same issue when trying previously on Windows 10. I tried reinstalling the python "torch" module, as it seems to be responsible for installing CUDA if I'm not mistaken. I tried installing torch with both commands provided in the ComfyUI repo for both stable and nightly, but none fixed the issue:
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu121
pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu121
Error Log:
It only seems an issue with this particular node:
The text was updated successfully, but these errors were encountered: