Skip to content

[Windows] Installation Problems / Solutions #5

@MNeMoNiCuZ

Description

@MNeMoNiCuZ

I mentioned elsewhere that the Readme is lacking some information about initialization and setup. So I figured I'd document my progress here so you know where I, as a sample user, got stuck.

  1. Installation states: We rely on torch with CUDA installed correctly., but it doesn't mention either version. Nor order of installation.
  2. Assuming order is important > Python > Cuda > Torch > Requirements. But please state the exact order for beginners.
  3. Assuming python version. Installing with 3.10
  4. Assuming Cuda 12.4. It's common and stable.
  5. Assuming Pytorch 2.51 and torchvision 0.20.1 due to the help received by user Biaru mentioning that it's documented in the Huggingface. I cannot find it there, nor should I have to search for the information there. The code documentation should be here, where the code is :)
  6. uv pip install torch==2.5.1 torchvision==0.20.1 torchaudio --index-url https://download.pytorch.org/whl/cu124
  7. When installing requirements, I'm immediately met with this:
Starting installation from requirements.txt...
error: Expected `--hash`, found `"--no-build-isolation"` at requirements.txt:16:12

Which is of course, flash-attn --no-build-isolation
This is notoriously not installing on Windows. It's not clear if you are supporting Windows installation on the project page.

If I comment out the flash-attn, and retry installation, here's my next area of getting stuck:

Using Python 3.10.9 environment at: venv
Resolved 96 packages in 463ms
  x Failed to build `meshiki==0.0.5`
  |-> The build backend returned an error
  `-> Call to `setuptools.build_meta.build_wheel` failed (exit code: 1)

      [stdout]
      running bdist_wheel
      running build
      running build_py
      copying meshiki\__init__.py -> build\lib.win-amd64-cpython-310\meshiki
      running egg_info
      writing meshiki.egg-info\PKG-INFO
      writing dependency_links to meshiki.egg-info\dependency_links.txt
      writing requirements to meshiki.egg-info\requires.txt
      writing top-level names to meshiki.egg-info\top_level.txt
      reading manifest file 'meshiki.egg-info\SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      adding license file 'LICENSE'
      writing manifest file 'meshiki.egg-info\SOURCES.txt'
      running build_ext
      building '_meshiki' extension
      "C:\Program Files (x86)\Microsoft Visual
      Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG
      /MD -IC:\Users\user\AppData\Local\uv\cache\sdists-v9\pypi\meshiki\0.0.5\kgmA_ip9Y4tQwu7kEqWfb\src\include
      -IC:\Users\user\AppData\Local\uv\cache\builds-v0\.tmpFmInEX\lib\site-packages\pybind11\include
      -IC:\Users\user\AppData\Local\uv\cache\builds-v0\.tmpFmInEX\include
      -IC:\Python310\include -IC:\Python310\Include "-IC:\Program Files (x86)\Microsoft Visual
      Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\include" "-IC:\Program Files (x86)\Microsoft
      Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows
      Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um"
      "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program
      Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows
      Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um"
      /EHsc /Tpsrc/bindings.cpp /Fobuild\temp.win-amd64-cpython-310\Release\src\bindings.obj /std:c++latest /EHsc
      /bigobj -std=c++17 -O3
      bindings.cpp
      C:\Users\user\AppData\Local\uv\cache\sdists-v9\pypi\meshiki\0.0.5\kgmA_ip9Y4tQwu7kEqWfb\src\include\meshiki/utils.h(105):
      warning C4267: 'argument': conversion from 'size_t' to 'const int', possible loss of data
      C:\Users\user\AppData\Local\uv\cache\sdists-v9\pypi\meshiki\0.0.5\kgmA_ip9Y4tQwu7kEqWfb\src\include\meshiki/utils.h(108):
      warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
      C:\Users\user\AppData\Local\uv\cache\sdists-v9\pypi\meshiki\0.0.5\kgmA_ip9Y4tQwu7kEqWfb\src\include\meshiki/utils.h(109):
      ...
      ...
      ...
      warning C4244: 'initializing': conversion from 'float' to 'int', possible loss of data
      C:\Users\user\AppData\Local\uv\cache\sdists-v9\pypi\meshiki\0.0.5\kgmA_ip9Y4tQwu7kEqWfb\src\include\meshiki/mesh.h(960):
      warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
      [stderr]
      cl : Command line warning D9002 : ignoring unknown option '-std=c++17'
      cl : Command line warning D9002 : ignoring unknown option '-O3'
      error: command 'C:\\Program Files (x86)\\Microsoft Visual
      Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.40.33807\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2

      hint: This usually indicates a problem with the package or the build environment.

So, meshiki is failing on Windows at least.
https://pypi.org/project/meshiki/ provided no further guide for Windows or anything.

If I comment out meshiki and install requirements, the rest installs fine.

Trying to launch py app.py:

(venv) C:\AI\3D\PartPacker>py app.py
Traceback (most recent call last):
  File "C:\AI\3D\PartPacker\app.py", line 25, in <module>
    from flow.model import Model
  File "C:\AI\3D\PartPacker\flow\model.py", line 21, in <module>
    from transformers import Dinov2Model
ModuleNotFoundError: No module named 'transformers'

Okay, not sure why transformers weren't part of requirements?
pip install transformers

Launching again:

Now it's downloading the models automatically to my hubcache directory.
So the pretrained models instruction wasn't necessary. I did this step the last time, but it failed with wget and others. You could also just have linked directly to the file, but since it auto-downloads, you could mention that it auto-downloads.
In fact, the gradio GUI auto-downloads even if you have the models in the pretrained directory. So this wget step does not actually help, not with the GUI at least.

After this download, the gradio GUI give me the URL and I can enter the server and it appears to work.

Feedback

The option of saving as OBJ/STL would be appreciated.

Fortunately these websites help converting from the GLB-format into something useful:
https://glb.ee/
https://convert3d.org/glb-to-obj/app

An option to auto-prune very tiny details would be nice.
Image

Single triangle miniscule meshes inside other meshes are usually safe to delete. Maybe some algorithm that compares the extents of each mesh compared to the others, and ones that are much smaller than some other groups to be pruned?

Overall, great work with the model, it appears to work quite alright!

Commercial use when? It's a shame to not be able to use the model for other workflows or work. The licence kind of breaks the chain of potential of what could be done here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions