Skip to content
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

Environment issues on Windows 11 #12

Open
MarsEverythingTech opened this issue Aug 1, 2024 · 23 comments
Open

Environment issues on Windows 11 #12

MarsEverythingTech opened this issue Aug 1, 2024 · 23 comments

Comments

@MarsEverythingTech
Copy link

Hello,

I was trying to install the repo locally on my PC, however, I was unable to perform the last step: pip install git+https://github.com/facebookresearch/detectron2@main#subdirectory=projects/DensePose
as it is giving me an error in red: error: could not build wheels for detectron2, which is required to install pyproject.toml-based projects
I've been told to install VS Build Tools but that didn't help.

Thanks in advance

@Zheng-Chong
Copy link
Owner

If your PC is Windows OS, have you checked #8

@MarsEverythingTech
Copy link
Author

If your PC is Windows OS, have you checked #8

Yes, I am on Windows 11, I also checked #8, but I am getting this error:
LoadAutoMasker
CatVTON
AutoMasker
LoadCatVTONPipeline
Nodes that have failed to load will show as red on the graph.

@Zheng-Chong
Copy link
Owner

What about #7 , it seems you have similar situation?

@MarsEverythingTech
Copy link
Author

MarsEverythingTech commented Aug 2, 2024

What about #7 , it seems you have similar situation?

This is what I did:

1- Installed the repo from URL using Manager
2- Downloaded the Detectron2 & DensePose from Releases and extracted them in to ComfyUI\venv\Lib\site-packages
3- Downloaded the .json (workflow) then dragged it into ComfyUI.
4- After that, the error showed up.

Also, the post you mentioned #7, I already installed Visual Studio Build Tools, but that still didn't help.

@Zheng-Chong
Copy link
Owner

2.Download ComfyUI-CatVTON.zip and unzip it in the custom_nodes folder under your ComfyUI project (clone from ComfyUI).

@MarsEverythingTech
Copy link
Author

MarsEverythingTech commented Aug 2, 2024

2.Download ComfyUI-CatVTON.zip and unzip it in the custom_nodes folder under your ComfyUI project (clone from ComfyUI).

Yes, I have already done that, but it didn't work

@Zheng-Chong
Copy link
Owner

2.Download ComfyUI-CatVTON.zip and unzip it in the custom_nodes folder under your ComfyUI project (clone from ComfyUI).

Yes, I have already done that, but it didn't work

After that. have you restarted the ComfyUI?

@MarsEverythingTech
Copy link
Author

2.Download ComfyUI-CatVTON.zip and unzip it in the custom_nodes folder under your ComfyUI project (clone from ComfyUI).

Yes, I have already done that, but it didn't work

After that. have you restarted the ComfyUI?

Yes I did.

@Zheng-Chong
Copy link
Owner

I'm very sorry that we can't solve your problem, but we don't have a test machine running on WindowsOS and can't reproduce your problem, so we can't provide further help.
I saw that you also raised the same problem in another repo Comfyui-catvton expecially for WindowOS, maybe it can be solved there.

@MarsEverythingTech
Copy link
Author

I'm very sorry that we can't solve your problem, but we don't have a test machine running on WindowsOS and can't reproduce your problem, so we can't provide further help. I saw that you also raised the same problem in another repo Comfyui-catvton expecially for WindowOS, maybe it can be solved there.

How about installing it locally, I am just having trouble with the last step and is giving me this error:

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for detectron2
Running setup.py clean for detectron2
Successfully built detectron2-densepose
Failed to build detectron2
ERROR: Could not build wheels for detectron2, which is required to install pyproject.toml-based projects

@Zheng-Chong
Copy link
Owner

I'm very sorry that we can't solve your problem, but we don't have a test machine running on WindowsOS and can't reproduce your problem, so we can't provide further help. I saw that you also raised the same problem in another repo Comfyui-catvton expecially for WindowOS, maybe it can be solved there.

How about installing it locally, I am just having trouble with the last step and is giving me this error:

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for detectron2 Running setup.py clean for detectron2 Successfully built detectron2-densepose Failed to build detectron2 ERROR: Could not build wheels for detectron2, which is required to install pyproject.toml-based projects

Another issue in detectron2 repo provides a solution, maybe you can try it. facebookresearch/detectron2#5008 (comment)

@MarsEverythingTech
Copy link
Author

I'm very sorry that we can't solve your problem, but we don't have a test machine running on WindowsOS and can't reproduce your problem, so we can't provide further help. I saw that you also raised the same problem in another repo Comfyui-catvton expecially for WindowOS, maybe it can be solved there.

How about installing it locally, I am just having trouble with the last step and is giving me this error:
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for detectron2 Running setup.py clean for detectron2 Successfully built detectron2-densepose Failed to build detectron2 ERROR: Could not build wheels for detectron2, which is required to install pyproject.toml-based projects

Another issue in detectron2 repo provides a solution, maybe you can try it. facebookresearch/detectron2#5008 (comment)

Would using a Docker help?

@Zheng-Chong
Copy link
Owner

Zheng-Chong commented Aug 2, 2024

is pip install git+https://github.com/facebookresearch/detectron2.git@v0.6#subdirectory=projects/DensePose the command you use?

#5 reported the installment error of detectron2 in Win.

@MarsEverythingTech
Copy link
Author

is pip install git+https://github.com/facebookresearch/detectron2.git@v0.6#subdirectory=projects/DensePose the command you use?

#5 reported the installment error of detectron2 in Win.

Yes, I followed the step and got them installed. However, when running:
python app.py --output_dir="resource/demo/output" --mixed_precision="bf16" --allow_tf32

I get the following error:
No CUDA runtime is found, using CUDA_HOME='C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin'
C:\Users\miniconda3\envs\catvton\lib\site-packages\torch\utils\cpp_extension.py:383: UserWarning: Error checking compiler version for cl: [WinError 2] The system cannot find the file specified
warnings.warn(f'Error checking compiler version for {compiler}: {error}')
Traceback (most recent call last):
File "C:\CatVTON\app.py", line 12, in
from model.cloth_masker import AutoMasker, vis_mask
File "C:\CatVTON\model\cloth_masker.py", line 9, in
from model.SCHP import SCHP # type: ignore
File "C:\CatVTON\model\SCHP_init_.py", line 1, in
from model.SCHP import networks
File "C:\CatVTON\model\SCHP\networks_init_.py", line 3, in
from model.SCHP.networks.AugmentCE2P import resnet101
File "C:\CatVTON\model\SCHP\networks\AugmentCE2P.py", line 21, in
from model.SCHP.modules import InPlaceABNSync
File "C:\CatVTON\model\SCHP\modules_init_.py", line 1, in
from .bn import ABN, InPlaceABN, InPlaceABNSync
File "C:\CatVTON\model\SCHP\modules\bn.py", line 10, in
from .functions import *
File "C:\CatVTON\model\SCHP\modules\functions.py", line 10, in
_backend = load(name="inplace_abn",
File "C:\Users\miniconda3\envs\catvton\lib\site-packages\torch\utils\cpp_extension.py", line 1308, in load
return _jit_compile(
File "C:\Users\miniconda3\envs\catvton\lib\site-packages\torch\utils\cpp_extension.py", line 1710, in _jit_compile
_write_ninja_file_and_build_library(
File "C:\Users\miniconda3\envs\catvton\lib\site-packages\torch\utils\cpp_extension.py", line 1810, in _write_ninja_file_and_build_library
_write_ninja_file_to_build_library(
File "C:\Users\miniconda3\envs\catvton\lib\site-packages\torch\utils\cpp_extension.py", line 2199, in _write_ninja_file_to_build_library
cuda_flags = common_cflags + COMMON_NVCC_FLAGS + _get_cuda_arch_flags()
File "C:\Users\miniconda3\envs\catvton\lib\site-packages\torch\utils\cpp_extension.py", line 1980, in _get_cuda_arch_flags
arch_list[-1] += '+PTX'
IndexError: list index out of range

@Zheng-Chong
Copy link
Owner

It looks like your torch and cuda versions conflict, maybe you can google the specific error message

@MarsEverythingTech
Copy link
Author

It looks like your torch and cuda versions conflict, maybe you can google the specific error message

Could you please help me fix it?

@MarsEverythingTech
Copy link
Author

MarsEverythingTech commented Aug 2, 2024

It looks like your torch and cuda versions conflict, maybe you can google the specific error message

Ok now I am getting this error:

C:\Users\miniconda3\envs\catvton\lib\site-packages\torch\utils\cpp_extension.py:380: UserWarning: Error checking compiler version for cl: [WinError 2] The system cannot find the file specified
warnings.warn(f'Error checking compiler version for {compiler}: {error}')
C:\Users\miniconda3\envs\catvton\lib\site-packages\torch\utils\cpp_extension.py:1965: UserWarning: TORCH_CUDA_ARCH_LIST is not set, all archs for visible cards are included for compilation.
If this is not desired, please set os.environ['TORCH_CUDA_ARCH_LIST'].
warnings.warn(
INFO: Could not find files for the given pattern(s).
Traceback (most recent call last):
File "C:\CatVTON\app.py", line 12, in
from model.cloth_masker import AutoMasker, vis_mask
File "C:\CatVTON\model\cloth_masker.py", line 9, in
from model.SCHP import SCHP # type: ignore
File "C:\CatVTON\model\SCHP_init_.py", line 1, in
from model.SCHP import networks
File "C:\CatVTON\model\SCHP\networks_init_.py", line 3, in
from model.SCHP.networks.AugmentCE2P import resnet101
File "C:\CatVTON\model\SCHP\networks\AugmentCE2P.py", line 21, in
from model.SCHP.modules import InPlaceABNSync
File "C:\CatVTON\model\SCHP\modules_init_.py", line 1, in
from .bn import ABN, InPlaceABN, InPlaceABNSync
File "C:\CatVTON\model\SCHP\modules\bn.py", line 10, in
from .functions import *
File "C:\CatVTON\model\SCHP\modules\functions.py", line 10, in
_backend = load(name="inplace_abn",
File "C:\Users\miniconda3\envs\catvton\lib\site-packages\torch\utils\cpp_extension.py", line 1312, in load
return _jit_compile(
File "C:\Users\miniconda3\envs\catvton\lib\site-packages\torch\utils\cpp_extension.py", line 1722, in _jit_compile
_write_ninja_file_and_build_library(
File "C:\Users\miniconda3\envs\catvton\lib\site-packages\torch\utils\cpp_extension.py", line 1821, in _write_ninja_file_and_build_library
_write_ninja_file_to_build_library(
File "C:\Users\miniconda3\envs\catvton\lib\site-packages\torch\utils\cpp_extension.py", line 2246, in _write_ninja_file_to_build_library
_write_ninja_file(
File "C:\Users\miniconda3\envs\catvton\lib\site-packages\torch\utils\cpp_extension.py", line 2382, in _write_ninja_file
cl_paths = subprocess.check_output(['where',
File "C:\Users\miniconda3\envs\catvton\lib\subprocess.py", line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "C:\Users\miniconda3\envs\catvton\lib\subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['where', 'cl']' returned non-zero exit status 1.

@Zheng-Chong
Copy link
Owner

I'm sorry, but the environment setup is quite complex. It involves not only the operating system but also graphics card drivers and dependencies of other packages. I find it difficult to provide specific help to fix the bug for you.

I will keep this issue open to see if anyone else encounters a similar problem.

@Zheng-Chong Zheng-Chong changed the title Unable To Perform Last Step Environment issues on Windows 11 Aug 2, 2024
@MarsEverythingTech
Copy link
Author

I'm sorry, but the environment setup is quite complex. It involves not only the operating system but also graphics card drivers and dependencies of other packages. I find it difficult to provide specific help to fix the bug for you.

I will keep this issue open to see if anyone else encounters a similar problem.

Hello, I have fixed that error by installing other packages for VS Build Tools, however, I am having this issue:
\miniconda3\envs\catvton\lib\site-packages\torch\utils\cpp_extension.py:1965: UserWarning: TORCH_CUDA_ARCH_LIST is not set, all archs for visible cards are included for compilation.
If this is not desired, please set os.environ['TORCH_CUDA_ARCH_LIST'].

Then I did: set TORCH_CUDA_ARCH_LIST="8.6"
but returned with another error:
File "C:\Users\miniconda3\envs\catvton\lib\site-packages\torch\utils\cpp_extension.py", line 1998, in _get_cuda_arch_flags
raise ValueError(f"Unknown CUDA arch ({arch}) or GPU not supported")
ValueError: Unknown CUDA arch ("8.6") or GPU not supported

@justinjohn0306
Copy link

I was able to get it working on windows but had to do a few adjustments in order to successfully build the modules

image

@MarsEverythingTech
Copy link
Author

I was able to get it working on windows but had to do a few adjustments in order to successfully build the modules

image

Amazing! Could you please provide me the steps on how you made it work?

Thanks in advance

@valaxy
Copy link

valaxy commented Sep 8, 2024

failed on win11 but with error:

Ninja is required to load C++ extensions

but in fact

pip install ninja

works

@dseditor
Copy link

dseditor commented Sep 9, 2024

For the "where cl" error,
Starting ComfyUI using “x64 Native Tools Command Prompt for VS 2022”,Do not using original cmd/powershell.
That's maybe the problem of the VC env settings in WindowsOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants