OOTDiffusion icon indicating copy to clipboard operation
OOTDiffusion copied to clipboard

[Tutorial] Windows installation instruction

Open iyume opened this issue 1 year ago • 2 comments

So far, I had seen many people getting trouble in windows installation. Most of them are:

  • subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1
  • subprocess.CalledProcessError: Command '['where', 'cl']' returned non-zero exit status 1
  • fatal error: xxx.h: No such file or directory / ninja: build stopped: subcommand failed.

I'm exploring a effective way to solve all these problems.

See: https://github.com/AuroBit/ComfyUI-OOTDiffusion#windows-%E6%8C%87%E5%8D%97

iyume avatar Mar 01 '24 10:03 iyume

Basically set up works on windows with python version 3.10 (with 3.11 and 3.12 i faced few issues).

Then install Visual stusio 2019 or 2022. Community version works as well.

Then for subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1,
pip install ninja einops It is already mentioned in the git repo's installation instruction ..with python 3.10 this version works: einops==0.7.0 ninja==1.10.2

And to avoid subprocess.CalledProcessError: Command '['where', 'cl']' returned non-zero exit status 1, you need to add visual studio compiler to path, I followed this link [https://github.com/HRNet/HRNet-Semantic-Segmentation/issues/39]. Just add C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx86\x86 to system variable path. I guess it should do the clean setup on windows.

satyaai avatar Mar 04 '24 07:03 satyaai

You can't even compile helloworld if you just add cl.exe to PATH.

See: https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170#path_and_environment

Once you have compiled it, there is no need to recompile though it checks cl.exe...So adding it to PATH maybe convenient sometimes.

I would recommend to write a start script on Windows platform.

iyume avatar Mar 04 '24 07:03 iyume