From 6311e7f5072b3238283a084e60011e88430e0913 Mon Sep 17 00:00:00 2001 From: WaefreBeorn <32711803+emangamer@users.noreply.github.com> Date: Thu, 25 Apr 2024 21:13:17 -0400 Subject: [PATCH 01/14] Create Start_Windows.bat makes a ripped functional copy of start windows for windows env --- Start_Windows.bat | 88 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 Start_Windows.bat diff --git a/Start_Windows.bat b/Start_Windows.bat new file mode 100644 index 0000000..4f234e2 --- /dev/null +++ b/Start_Windows.bat @@ -0,0 +1,88 @@ +@echo off + +if not defined PYTHON (set PYTHON=python) +if not defined VENV_DIR (set "VENV_DIR=%~dp0%venv") +if not defined REQUIREMENTS_FILE (set "REQUIREMENTS_FILE=requirements.txt") + +set ERROR_REPORTING=TRUE + +mkdir tmp 2>NUL + +%PYTHON% -c "" >tmp/stdout.txt 2>tmp/stderr.txt +if %ERRORLEVEL% == 0 goto :check_pip + +echo Couldn't launch python +goto :show_stdout_stderr + +:check_pip +%PYTHON% -mpip --help >tmp/stdout.txt 2>tmp/stderr.txt +if %ERRORLEVEL% == 0 goto :start_venv + +if "%PIP_INSTALLER_LOCATION%" == "" goto :show_stdout_stderr +%PYTHON% "%PIP_INSTALLER_LOCATION%" >tmp/stdout.txt 2>tmp/stderr.txt +if %ERRORLEVEL% == 0 goto :start_venv + +echo Couldn't install pip +goto :show_stdout_stderr + +:start_venv +if ["%VENV_DIR%"] == ["-"] goto :skip_venv +if ["%SKIP_VENV%"] == ["1"] goto :skip_venv + +dir "%VENV_DIR%\Scripts\Python.exe" >tmp/stdout.txt 2>tmp/stderr.txt +if %ERRORLEVEL% == 0 goto :activate_venv + +for /f "delims=" %%i in ('CALL %PYTHON% -c "import sys; print(sys.executable)"') do set PYTHON_FULLNAME="%%i" +echo Creating venv in directory %VENV_DIR% using python %PYTHON_FULLNAME% +%PYTHON_FULLNAME% -m venv "%VENV_DIR%" >tmp/stdout.txt 2>tmp/stderr.txt +if %ERRORLEVEL% == 0 goto :activate_venv + +echo Unable to create venv in directory "%VENV_DIR%" +goto :show_stdout_stderr + +:activate_venv +set PYTHON="%VENV_DIR%\Scripts\Python.exe" +echo Activating venv... +call "%VENV_DIR%\Scripts\activate.bat" + +:install_requirements +echo Installing requirements from %REQUIREMENTS_FILE%... +%PYTHON% -m pip install -r %REQUIREMENTS_FILE% --verbose +if %ERRORLEVEL% == 0 ( + echo Requirements installed successfully. + goto :launch +) else ( + echo Failed to install requirements. + goto :show_stdout_stderr +) + +:skip_venv +goto :launch + +:launch +echo Launching script... +%PYTHON% app.py %* +pause +exit /b + +:show_stdout_stderr +echo. +echo exit code: %errorlevel% + +for /f %%i in ("tmp\stdout.txt") do set size=%%~zi +if %size% equ 0 goto :show_stderr +echo. +echo stdout: +type tmp\stdout.txt + +:show_stderr +for /f %%i in ("tmp\stderr.txt") do set size=%%~zi +if %size% equ 0 goto :show_stderr +echo. +echo stderr: +type tmp\stderr.txt + +:endofscript +echo. +echo Launch unsuccessful. Exiting. +pause From 93ac83b339d283a6670006aa377ef78b797aa54e Mon Sep 17 00:00:00 2001 From: WaefreBeorn <32711803+emangamer@users.noreply.github.com> Date: Thu, 25 Apr 2024 21:13:43 -0400 Subject: [PATCH 02/14] Update requirements.txt missing requirement causes launch to hang, added and fixed --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index aa68bbd..aff1c38 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,6 +4,7 @@ huggingface-hub einops omegaconf torchmetrics +torchvision webdataset accelerate tensorboard @@ -16,4 +17,4 @@ bitsandbytes imageio[ffmpeg] xatlas plyfile -git+https://github.com/NVlabs/nvdiffrast/ \ No newline at end of file +git+https://github.com/NVlabs/nvdiffrast/ From e0dcd0dbb4377f12fabcc29c704d0329e1886adb Mon Sep 17 00:00:00 2001 From: WaefreBeorn <32711803+emangamer@users.noreply.github.com> Date: Thu, 25 Apr 2024 21:26:18 -0400 Subject: [PATCH 03/14] Update Start_Windows.bat adds a default conda installation, easier for dummys, using this it can install cuda version agnostic, and also makes a proper venv instead of docker which is prone to deployment issues --- Start_Windows.bat | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/Start_Windows.bat b/Start_Windows.bat index 4f234e2..d410116 100644 --- a/Start_Windows.bat +++ b/Start_Windows.bat @@ -3,11 +3,32 @@ if not defined PYTHON (set PYTHON=python) if not defined VENV_DIR (set "VENV_DIR=%~dp0%venv") if not defined REQUIREMENTS_FILE (set "REQUIREMENTS_FILE=requirements.txt") +if not defined CONDA_URL (set "CONDA_URL=https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe") +if not defined CONDA_INSTALL_DIR (set "CONDA_INSTALL_DIR=%UserProfile%\miniconda3") set ERROR_REPORTING=TRUE mkdir tmp 2>NUL +where conda >tmp/stdout.txt 2>tmp/stderr.txt +if %ERRORLEVEL% == 0 goto :install_cuda + +echo Conda not found. Installing Conda... +powershell -Command "Invoke-WebRequest -Uri '%CONDA_URL%' -OutFile 'miniconda_installer.exe'" +start /wait "" miniconda_installer.exe /InstallationType=JustMe /RegisterPython=0 /S /D=%CONDA_INSTALL_DIR% +set "PATH=%CONDA_INSTALL_DIR%;%CONDA_INSTALL_DIR%\Scripts;%CONDA_INSTALL_DIR%\Library\bin;%PATH%" +del miniconda_installer.exe + +:install_cuda +echo Installing CUDA using conda... +conda install -y cuda -c nvidia/label/cuda-12.1.0 +if %ERRORLEVEL% == 0 ( + echo CUDA installed successfully. +) else ( + echo Failed to install CUDA using conda. +) + +:install_requirements %PYTHON% -c "" >tmp/stdout.txt 2>tmp/stderr.txt if %ERRORLEVEL% == 0 goto :check_pip @@ -77,7 +98,7 @@ type tmp\stdout.txt :show_stderr for /f %%i in ("tmp\stderr.txt") do set size=%%~zi -if %size% equ 0 goto :show_stderr +if %size% equ 0 goto :endofscript echo. echo stderr: type tmp\stderr.txt From b7bfe98c6f18967ee86131653dba8b6e80a4c2cd Mon Sep 17 00:00:00 2001 From: WaefreBeorn <32711803+emangamer@users.noreply.github.com> Date: Thu, 25 Apr 2024 21:45:36 -0400 Subject: [PATCH 04/14] Update requirements.txt fixes the requirements to be static to the release version, also makes the conda env installer function right --- requirements.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index aff1c38..1cc0358 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,6 @@ huggingface-hub einops omegaconf torchmetrics -torchvision webdataset accelerate tensorboard @@ -18,3 +17,9 @@ imageio[ffmpeg] xatlas plyfile git+https://github.com/NVlabs/nvdiffrast/ +Ninja +torch==2.1.0 +torchvision==0.16.0 +torchaudio==2.1.0 +xformers==0.0.22.post7 +https://huggingface.co/r4ziel/xformers_pre_built/resolve/main/triton-2.0.0-cp310-cp310-win_amd64.whl From bdcf8087d88f54cd00540cf8489a0b6e1870a57d Mon Sep 17 00:00:00 2001 From: WaefreBeorn <32711803+emangamer@users.noreply.github.com> Date: Thu, 25 Apr 2024 22:05:27 -0400 Subject: [PATCH 05/14] Update requirements.txt fixes url indexing issue, allows cuda to install --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 1cc0358..370c71a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,7 +18,8 @@ xatlas plyfile git+https://github.com/NVlabs/nvdiffrast/ Ninja -torch==2.1.0 +--index-url https://download.pytorch.org/whl/cu121 +torch==2.1.0+cu121 torchvision==0.16.0 torchaudio==2.1.0 xformers==0.0.22.post7 From 49bb7ed836d49d34ecfdae928c051dbb6095675e Mon Sep 17 00:00:00 2001 From: WaefreBeorn <32711803+emangamer@users.noreply.github.com> Date: Sun, 28 Apr 2024 18:53:02 -0400 Subject: [PATCH 06/14] Update requirements.txt temporary change to my own fork until my update is pushed, for release candidate stability --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 370c71a..d8505f6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -16,7 +16,7 @@ bitsandbytes imageio[ffmpeg] xatlas plyfile -git+https://github.com/NVlabs/nvdiffrast/ +git+https://github.com/emangamer/nvdiffrast Ninja --index-url https://download.pytorch.org/whl/cu121 torch==2.1.0+cu121 From 5f3ef8ac8d6b3fc52bc961d95599d53a18b9ff67 Mon Sep 17 00:00:00 2001 From: WaefreBeorn <32711803+emangamer@users.noreply.github.com> Date: Sun, 28 Apr 2024 18:54:20 -0400 Subject: [PATCH 07/14] Update Start_Windows.bat uses Claude Opus conversations to create and fix a bat file that runs, uses user provided visual studio paths but can be used with visual studio 2019 --- Start_Windows.bat | 130 +++++++++++++++++++++++++++++++++------------- 1 file changed, 93 insertions(+), 37 deletions(-) diff --git a/Start_Windows.bat b/Start_Windows.bat index d410116..92a92da 100644 --- a/Start_Windows.bat +++ b/Start_Windows.bat @@ -1,50 +1,63 @@ @echo off -if not defined PYTHON (set PYTHON=python) +REM Set Python to use UTF-8 encoding by default +set PYTHONUTF8=1 + +if not defined PYTHON ( + for /f "delims=" %%P in ('where python') do ( + set PYTHON=%%P + ) +) if not defined VENV_DIR (set "VENV_DIR=%~dp0%venv") if not defined REQUIREMENTS_FILE (set "REQUIREMENTS_FILE=requirements.txt") -if not defined CONDA_URL (set "CONDA_URL=https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe") if not defined CONDA_INSTALL_DIR (set "CONDA_INSTALL_DIR=%UserProfile%\miniconda3") -set ERROR_REPORTING=TRUE - -mkdir tmp 2>NUL - -where conda >tmp/stdout.txt 2>tmp/stderr.txt -if %ERRORLEVEL% == 0 goto :install_cuda +REM You need to set this if nvdiffrast won't compile +REM Found in C:\Program Files\Microsoft Visual Studio\(TYPE OF STUDIO)\VC\Tools\MSVC\(VERSION#)\bin\Hostx64\x64 +REM also in :find_msvcprt you need to set the -echo Conda not found. Installing Conda... -powershell -Command "Invoke-WebRequest -Uri '%CONDA_URL%' -OutFile 'miniconda_installer.exe'" -start /wait "" miniconda_installer.exe /InstallationType=JustMe /RegisterPython=0 /S /D=%CONDA_INSTALL_DIR% -set "PATH=%CONDA_INSTALL_DIR%;%CONDA_INSTALL_DIR%\Scripts;%CONDA_INSTALL_DIR%\Library\bin;%PATH%" -del miniconda_installer.exe - -:install_cuda -echo Installing CUDA using conda... -conda install -y cuda -c nvidia/label/cuda-12.1.0 -if %ERRORLEVEL% == 0 ( - echo CUDA installed successfully. -) else ( - echo Failed to install CUDA using conda. +set ERROR_REPORTING=TRUE +set CUDA_VERSION=12.1 +set CUDA_DOWNLOAD_LINK=https://developer.download.nvidia.com/compute/cuda/12.4.0/network_installers/cuda_12.4.0_windows_network.exe +set MSVC_REDIST_URL=https://aka.ms/vs/17/release/vc_redist.x64.exe +set DISTUTILS_USE_SDK=1 +set NVDIFFRAST_TORCH_LOAD_VERBOSE=1 + +REM Detect Visual Studio installation path +set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" +if not exist "%VSWHERE%" set "VSWHERE=%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" + +if exist "%VSWHERE%" ( + for /f "usebackq tokens=*" %%i in (`"%VSWHERE%" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do ( + set VSPATH=%%i + ) ) -:install_requirements -%PYTHON% -c "" >tmp/stdout.txt 2>tmp/stderr.txt -if %ERRORLEVEL% == 0 goto :check_pip +if defined VSPATH ( + for /f "usebackq tokens=*" %%i in (`dir /b /s /o:n "%VSPATH%\VC\Tools\MSVC\*"`) do ( + set "MSVC_DIR=%%i" + goto :found_msvc + ) +) -echo Couldn't launch python -goto :show_stdout_stderr +:found_msvc +if defined MSVC_DIR ( + set "INCLUDE=%MSVC_DIR%\include;%INCLUDE%" + set "LIB=%MSVC_DIR%\lib\x64;%LIB%" +) -:check_pip -%PYTHON% -mpip --help >tmp/stdout.txt 2>tmp/stderr.txt -if %ERRORLEVEL% == 0 goto :start_venv +REM Add Windows SDK paths +set "INCLUDE=C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt;%INCLUDE%" +set "INCLUDE=C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared;%INCLUDE%" +set "INCLUDE=C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um;%INCLUDE%" +set "LIB=C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\ucrt\x64;%LIB%" +set "LIB=C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x64;%LIB%" -if "%PIP_INSTALLER_LOCATION%" == "" goto :show_stdout_stderr -%PYTHON% "%PIP_INSTALLER_LOCATION%" >tmp/stdout.txt 2>tmp/stderr.txt -if %ERRORLEVEL% == 0 goto :start_venv +REM Add Python library path +set "PYTHON_LIB_PATH=C:\Program Files\Python310\libs" +set "LIB=%PYTHON_LIB_PATH%;%LIB%" -echo Couldn't install pip -goto :show_stdout_stderr +mkdir tmp 2>NUL :start_venv if ["%VENV_DIR%"] == ["-"] goto :skip_venv @@ -66,18 +79,62 @@ set PYTHON="%VENV_DIR%\Scripts\Python.exe" echo Activating venv... call "%VENV_DIR%\Scripts\activate.bat" +:install_msvc_redist +rem Check if Visual C++ Redistributable Packages are installed +where /r "%ProgramFiles%" vcruntime140.dll >nul 2>&1 +if %ERRORLEVEL% == 0 ( + echo Visual C++ Redistributable Packages are installed. + goto :find_msvcprt +) + +echo Downloading Visual C++ Redistributable Packages... +powershell -Command "Invoke-WebRequest %MSVC_REDIST_URL% -OutFile msvc_redist.exe" +echo Installing Visual C++ Redistributable Packages... +start /wait "" msvc_redist.exe /quiet +del msvc_redist.exe + +:find_msvcprt +rem Find the location of msvcprt.lib in the x64 folder of Visual Studio +set "MSVC_LIB_PATH=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x64" +if exist "%MSVC_LIB_PATH%\msvcprt.lib" ( + goto :set_msvc_path +) else ( + echo Could not find msvcprt.lib in the expected location. + goto :show_stdout_stderr +) + +:set_msvc_path +set MSVC_PATH=%MSVC_LIB_PATH% + +:check_cuda +%PYTHON% -c "import torch; print(torch.version.cuda)" >tmp/stdout.txt 2>tmp/stderr.txt +set /p INSTALLED_CUDA_VERSION= Date: Sun, 28 Apr 2024 18:55:31 -0400 Subject: [PATCH 08/14] Update Start_Windows.bat making sure paste is correct From b75bff42f74d8ec4b7163be5099a52725e952d4e Mon Sep 17 00:00:00 2001 From: WaefreBeorn <32711803+emangamer@users.noreply.github.com> Date: Sun, 28 Apr 2024 19:00:18 -0400 Subject: [PATCH 09/14] Update app.py changes server to launch on local host, should be changed for a pushed user variable in the bat file but I'm not implementing that today, just edit it here --- app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index a805d39..3148980 100644 --- a/app.py +++ b/app.py @@ -1,4 +1,6 @@ import os +os.environ['CUDA_HOME'] = os.environ.get('CUDA_HOME', r'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4') + import imageio import numpy as np import torch @@ -24,6 +26,7 @@ from huggingface_hub import hf_hub_download + def get_render_cameras(batch_size=1, M=120, radius=2.5, elevation=10.0, is_flexicubes=False): """ Get the rendering camera parameters. @@ -368,4 +371,4 @@ def make3d(images): ) demo.queue(max_size=10) -demo.launch(server_name="0.0.0.0", server_port=43839) +demo.launch(server_name="localhost", server_port=5000) From 6e5c79c688310d91fb4b26a166f5fad864b3a4f3 Mon Sep 17 00:00:00 2001 From: WaefreBeorn <32711803+emangamer@users.noreply.github.com> Date: Tue, 30 Apr 2024 21:41:00 -0400 Subject: [PATCH 10/14] Update Start_Windows.bat working on dummyproof release --- Start_Windows.bat | 132 +++++++++++----------------------------------- 1 file changed, 31 insertions(+), 101 deletions(-) diff --git a/Start_Windows.bat b/Start_Windows.bat index 92a92da..e91e1e8 100644 --- a/Start_Windows.bat +++ b/Start_Windows.bat @@ -12,38 +12,18 @@ if not defined VENV_DIR (set "VENV_DIR=%~dp0%venv") if not defined REQUIREMENTS_FILE (set "REQUIREMENTS_FILE=requirements.txt") if not defined CONDA_INSTALL_DIR (set "CONDA_INSTALL_DIR=%UserProfile%\miniconda3") -REM You need to set this if nvdiffrast won't compile -REM Found in C:\Program Files\Microsoft Visual Studio\(TYPE OF STUDIO)\VC\Tools\MSVC\(VERSION#)\bin\Hostx64\x64 -REM also in :find_msvcprt you need to set the - set ERROR_REPORTING=TRUE set CUDA_VERSION=12.1 -set CUDA_DOWNLOAD_LINK=https://developer.download.nvidia.com/compute/cuda/12.4.0/network_installers/cuda_12.4.0_windows_network.exe -set MSVC_REDIST_URL=https://aka.ms/vs/17/release/vc_redist.x64.exe set DISTUTILS_USE_SDK=1 set NVDIFFRAST_TORCH_LOAD_VERBOSE=1 -REM Detect Visual Studio installation path -set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -if not exist "%VSWHERE%" set "VSWHERE=%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" - -if exist "%VSWHERE%" ( - for /f "usebackq tokens=*" %%i in (`"%VSWHERE%" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do ( - set VSPATH=%%i - ) -) +REM Set VSPATH manually to the path of Visual Studio 2019 installation +set VSPATH=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community +REM Add Visual Studio 2019 paths if defined VSPATH ( - for /f "usebackq tokens=*" %%i in (`dir /b /s /o:n "%VSPATH%\VC\Tools\MSVC\*"`) do ( - set "MSVC_DIR=%%i" - goto :found_msvc - ) -) - -:found_msvc -if defined MSVC_DIR ( - set "INCLUDE=%MSVC_DIR%\include;%INCLUDE%" - set "LIB=%MSVC_DIR%\lib\x64;%LIB%" + set "INCLUDE=%VSPATH%\VC\Tools\MSVC\14.29.30133\include;%INCLUDE%" + set "LIB=%VSPATH%\VC\Tools\MSVC\14.29.30133\lib\x64;%LIB%" ) REM Add Windows SDK paths @@ -57,84 +37,50 @@ REM Add Python library path set "PYTHON_LIB_PATH=C:\Program Files\Python310\libs" set "LIB=%PYTHON_LIB_PATH%;%LIB%" -mkdir tmp 2>NUL - :start_venv if ["%VENV_DIR%"] == ["-"] goto :skip_venv if ["%SKIP_VENV%"] == ["1"] goto :skip_venv -dir "%VENV_DIR%\Scripts\Python.exe" >tmp/stdout.txt 2>tmp/stderr.txt +dir "%VENV_DIR%\Scripts\Python.exe" >nul 2>&1 if %ERRORLEVEL% == 0 goto :activate_venv for /f "delims=" %%i in ('CALL %PYTHON% -c "import sys; print(sys.executable)"') do set PYTHON_FULLNAME="%%i" echo Creating venv in directory %VENV_DIR% using python %PYTHON_FULLNAME% -%PYTHON_FULLNAME% -m venv "%VENV_DIR%" >tmp/stdout.txt 2>tmp/stderr.txt -if %ERRORLEVEL% == 0 goto :activate_venv - -echo Unable to create venv in directory "%VENV_DIR%" -goto :show_stdout_stderr +%PYTHON_FULLNAME% -m venv "%VENV_DIR%" +if %ERRORLEVEL% == 0 ( + echo Virtual environment created successfully. +) else ( + echo Failed to create virtual environment. + goto :end +) :activate_venv set PYTHON="%VENV_DIR%\Scripts\Python.exe" echo Activating venv... call "%VENV_DIR%\Scripts\activate.bat" -:install_msvc_redist -rem Check if Visual C++ Redistributable Packages are installed -where /r "%ProgramFiles%" vcruntime140.dll >nul 2>&1 -if %ERRORLEVEL% == 0 ( - echo Visual C++ Redistributable Packages are installed. - goto :find_msvcprt -) - -echo Downloading Visual C++ Redistributable Packages... -powershell -Command "Invoke-WebRequest %MSVC_REDIST_URL% -OutFile msvc_redist.exe" -echo Installing Visual C++ Redistributable Packages... -start /wait "" msvc_redist.exe /quiet -del msvc_redist.exe - -:find_msvcprt -rem Find the location of msvcprt.lib in the x64 folder of Visual Studio -set "MSVC_LIB_PATH=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x64" -if exist "%MSVC_LIB_PATH%\msvcprt.lib" ( - goto :set_msvc_path -) else ( - echo Could not find msvcprt.lib in the expected location. - goto :show_stdout_stderr -) - -:set_msvc_path -set MSVC_PATH=%MSVC_LIB_PATH% - -:check_cuda -%PYTHON% -c "import torch; print(torch.version.cuda)" >tmp/stdout.txt 2>tmp/stderr.txt -set /p INSTALLED_CUDA_VERSION= Date: Tue, 30 Apr 2024 21:41:43 -0400 Subject: [PATCH 11/14] Update requirements.txt manual links due to indexing issues --- requirements.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index d8505f6..82168fd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,8 +18,7 @@ xatlas plyfile git+https://github.com/emangamer/nvdiffrast Ninja ---index-url https://download.pytorch.org/whl/cu121 -torch==2.1.0+cu121 +torch @ https://download.pytorch.org/whl/cu121/torch-2.1.0%2Bcu121-cp310-cp310-win_amd64.whl#sha256=6ee083ba804e863af059ea284c1678c1b0628699fb0014c8e043ceed7d4ce930 torchvision==0.16.0 torchaudio==2.1.0 xformers==0.0.22.post7 From 8e1ec79b625cb5ca5540273e7c526232116f402f Mon Sep 17 00:00:00 2001 From: WaefreBeorn <32711803+emangamer@users.noreply.github.com> Date: Tue, 30 Apr 2024 21:54:52 -0400 Subject: [PATCH 12/14] Update Start_Windows.bat more fixing using claude to rewrite, dummy proofing to install instructions --- Start_Windows.bat | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Start_Windows.bat b/Start_Windows.bat index e91e1e8..f568a23 100644 --- a/Start_Windows.bat +++ b/Start_Windows.bat @@ -3,11 +3,9 @@ REM Set Python to use UTF-8 encoding by default set PYTHONUTF8=1 -if not defined PYTHON ( - for /f "delims=" %%P in ('where python') do ( - set PYTHON=%%P - ) -) +REM Set Python 3.10 installation path +set PYTHON=C:\Program Files\Python310\python.exe + if not defined VENV_DIR (set "VENV_DIR=%~dp0%venv") if not defined REQUIREMENTS_FILE (set "REQUIREMENTS_FILE=requirements.txt") if not defined CONDA_INSTALL_DIR (set "CONDA_INSTALL_DIR=%UserProfile%\miniconda3") @@ -44,9 +42,8 @@ if ["%SKIP_VENV%"] == ["1"] goto :skip_venv dir "%VENV_DIR%\Scripts\Python.exe" >nul 2>&1 if %ERRORLEVEL% == 0 goto :activate_venv -for /f "delims=" %%i in ('CALL %PYTHON% -c "import sys; print(sys.executable)"') do set PYTHON_FULLNAME="%%i" -echo Creating venv in directory %VENV_DIR% using python %PYTHON_FULLNAME% -%PYTHON_FULLNAME% -m venv "%VENV_DIR%" +echo Creating venv in directory %VENV_DIR% using python %PYTHON% +%PYTHON% -m venv "%VENV_DIR%" if %ERRORLEVEL% == 0 ( echo Virtual environment created successfully. ) else ( From b8bd8cff21d4f8ed3ee827a1d7f3ceccca3b7316 Mon Sep 17 00:00:00 2001 From: WaefreBeorn <32711803+emangamer@users.noreply.github.com> Date: Tue, 30 Apr 2024 22:53:30 -0400 Subject: [PATCH 13/14] Update Start_Windows.bat pasted ai chunk issue From 6cd614d9fd2a8793432c09d864ec72a7463044a7 Mon Sep 17 00:00:00 2001 From: WaefreBeorn <32711803+emangamer@users.noreply.github.com> Date: Tue, 30 Apr 2024 23:01:12 -0400 Subject: [PATCH 14/14] Update Start_Windows.bat missing quotes --- Start_Windows.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Start_Windows.bat b/Start_Windows.bat index f568a23..f837ebe 100644 --- a/Start_Windows.bat +++ b/Start_Windows.bat @@ -4,7 +4,7 @@ REM Set Python to use UTF-8 encoding by default set PYTHONUTF8=1 REM Set Python 3.10 installation path -set PYTHON=C:\Program Files\Python310\python.exe +set PYTHON="C:\Program Files\Python310\python.exe" if not defined VENV_DIR (set "VENV_DIR=%~dp0%venv") if not defined REQUIREMENTS_FILE (set "REQUIREMENTS_FILE=requirements.txt")