Closed turugi-ni closed 1 month ago
add path variable work
Definitely you could run it without conda. I don’t think the command would have a big difference, you can refer to that how the conda version does
I am trying to install it in a virtual environment with venv. https://github.com/AiuniAI/Unique3D/issues/15#issuecomment- of issues/15 Even if you install the software according to the instructions in (venv) F:\Unique3D-main\venv>python app.py D:\Touls\Programs\Python\Python310\python.exe: can't open file 'F:\Unique3D-main\venv\app.py': [Errno 2] No such file or directory Error.will appear.
According to your error, you attempted to run python in wrong directory, you should not run it in the venv folder, you should run it the parent folder
I tried to run it in the parent folder. F:\Unique3D>python app.py ERROR: onnxruntime_gpu-1.17.0-cp310-cp310-manylinux_2_28_x86_64.whl is not a supported wheel on this platform. ERROR: Invalid requirement: 'nvdiffrast==0.3.1.torch': Expected end or semicolon (after version specifier) nvdiffrast==0.3.1.torch
Traceback (most recent call last):
File "F:\Unique3D\app.py", line 23, in <module>
import fire
ModuleNotFoundError: No module named 'fire'
Error.will appear.
Also, activate the virtual environment. Even if you run
ERROR: onnxruntime_gpu-1.17.0-cp310-cp310-manylinux_2_28_x86_64.whl is not a supported wheel on this platform.
ERROR: Invalid requirement: 'nvdiffrast==0.3.1.torch': Expected end or semicolon (after version specifier)
nvdiffrast==0.3.1.torch
~~~~~~~^
Traceback (most recent call last):
File "F:\Unique3D\app.py", line 25, in <module>
from gradio_app.gradio_3dgen import create_ui as create_3d_ui
File "F:\Unique3D\gradio_app\gradio_3dgen.py", line 1, in <module>
import spaces
File "F:\Unique3D\venv\lib\site-packages\spaces\__init__.py", line 10, in <module>
from .zero.decorator import GPU
File "F:\Unique3D\venv\lib\site-packages\spaces\zero\decorator.py", line 21, in <module>
from .wrappers import regular_function_wrapper
File "F:\Unique3D\venv\lib\site-packages\spaces\zero\wrappers.py", line 15, in <module>
from multiprocessing.context import ForkProcess
ImportError: cannot import name 'ForkProcess' from 'multiprocessing.context' (D:\Touls\Programs\Python\Python310\lib\multiprocessing\context.py)
Error.will appear.
It is definitely that you miss lots of dependents which need to install manually
app.py at the beginning of the pip install package/onnxruntime_gpu-1.17.0-cp310-cp310-manylinux_2_28_x86_64.whl --force-reinstall --no-deps and pip install package/nvdiffrast-0.3.1.torch-cp310-cp310-linux_x86_64.whl --force-reinstall --no-deps Since it is described as My OS is Windows, not ylinux, so that is where the error occurs. therefore onnxruntime-win-x64-gpu-1.17.0 and nvdiffrast-0.3.1 source in the package folder and change the notation at the beginning of app.py to pip install package/onnxruntime-win-x64-gpu-1.17.0 --force-reinstall --no-deps and pip install package/nvdiffrast-0.3.1 --force-reinstall --no-deps and then change it to I ran app.py and it seems to install nvdiffrast-0.3.1, but onnxruntime-win-x64-gpu-1.17.0 will cause an error The error log is as follows
(venv) F:\Unique3D>python app.py
ERROR: Directory 'package/onnxruntime-win-x64-gpu-1.17.0' is not installable. Neither 'setup.py' nor 'pyproject.toml' found.
Processing f:\unique3d\package\nvdiffrast-0.3.1
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: nvdiffrast
Building wheel for nvdiffrast (pyproject.toml) ... done
Created wheel for nvdiffrast: filename=nvdiffrast-0.3.1-py3-none-any.whl size=140632 sha256=5bb62781386cc6471ad084baaafa616a6b714f780738df34e1603aa5b8d196de
Stored in directory: c:\users\turug\appdata\local\pip\cache\wheels\bf\db\68\709aa6d897f90c748a8f44b088fbe12dba707c6d84be374926
Successfully built nvdiffrast
Installing collected packages: nvdiffrast
Successfully installed nvdiffrast-0.3.1
Traceback (most recent call last):
File "F:\Unique3D\app.py", line 25, in
Clone the onnxruntime git code in the package folder and Change the notation at the beginning of app.py to pip install package/onnxruntime --force-reinstall --no-deps app.py I tried to start the error (venv) F:\Unique3D>python app.py Processing f:\unique3d\package\onnxruntime Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [17 lines of output]
Traceback (most recent call last):
File "F:\Unique3D\venv\lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Processing f:\unique3d\package\nvdiffrast-0.3.1
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: nvdiffrast
Building wheel for nvdiffrast (pyproject.toml) ... done
Created wheel for nvdiffrast: filename=nvdiffrast-0.3.1-py3-none-any.whl size=140632 sha256=5055597c64ecbda7c13625b43bd03eb693c489169974130f040fe57963f347cc
Stored in directory: c:\users\turug\appdata\local\pip\cache\wheels\bf\db\68\709aa6d897f90c748a8f44b088fbe12dba707c6d84be374926
Successfully built nvdiffrast
Installing collected packages: nvdiffrast
Attempting uninstall: nvdiffrast
Found existing installation: nvdiffrast 0.3.1
Uninstalling nvdiffrast-0.3.1:
Successfully uninstalled nvdiffrast-0.3.1
Successfully installed nvdiffrast-0.3.1
Traceback (most recent call last):
File "F:\Unique3D\app.py", line 25, in
I think we are one step closer to launching in a virtual environment.
First, build a virtual environment with
python -m venv venv
The name of the virtual environment can be arbitrary.
Next, move the current directory to the virtual environment folder and activate the virtual environment.
cd venv
.\Scripts\Activate
Update pip.
python -m pip install --upgrade pip
Install Unique3D dependencies.
pip install torch torchvision torchaudio xformers --index-url https://download.pytorch.org/whl/cu118 pip install https://softology.pro/wheels/triton-2.1.0-cp310-cp310-win_amd64.whl pip install ninja pip install diffusers==0.27.2 pip install grpcio werkzeug tensorboard-data-server
Uninstall xformers and install the cuda11.8 version.
pip uninstall -y xformers pip install --no-cache-dir --ignore-installed --force-reinstall --no-warn-conflicts xformers==0.0.25 --index-url https://download.pytorch.org/whl/cu118 pip uninstall -y torch pip uninstall -y torch pip install --no-cache-dir --ignore-installed --force-reinstall --no-warn-conflicts torch==2.2.1+cu118 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
Install onnxruntime and ort-nightly-gpu.
pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/ pip install ort-nightly-gpu
Install spaces-0.28.3-py3-none-any.whl.
pip install https://files.pythonhosted.org/packages/b2/3c/6205090507ea96e6e56d0deda8d0fc4c507026ef3772e55b637a5d0b7c61/spaces-0.28.3-py3-none-any.whl
Install the Unique3D source.
git clone https://huggingface.co/spaces/Wuvin/Unique3D
Move the current directory to the Unique3D folder.
cd Unique3D
Modify requirements.txt.
type requirements.txt | findstr /v pytorch3d > stripped.txt del requirements.txt ren stripped.txt requirements.txt type requirements.txt | findstr /v ort-nightly > stripped.txt del requirements.txt ren stripped.txt requirements.txt type requirements.txt | findstr /v onnxruntime > stripped.txt del requirements.txt ren stripped.txt requirements.txt type requirements.txt | findstr /v torch-scatter > stripped.txt del requirements.txt ren stripped.txt requirements.txt type requirements.txt | findstr /v diffusers > stripped.txt del requirements.txt ren stripped.txt requirements.txt type requirements.txt | findstr /v xformers > stripped.txt del requirements.txt ren stripped.txt requirements.txt type requirements.txt | findstr /v torch > stripped.txt del requirements.txt ren stripped.txt requirements.txt
Install Unique3D itself.
pip install -r requirements.txt
The files in the package folder are for Linax, so delete them.Start a new command prompt in the package folder and install the onnxruntime source code.
git clone https://github.com/microsoft/onnxruntime.git
Download the version 0.3.1 resource from nvdiffrast and extract it in the package folder.
Open Unique3D\app.py with the text editor tool and change the notations on lines 5 and 10, respectively, to
pip install package/onnxruntime --force-reinstall --no-deps
pip install package/nvdiffrast-0.3.1 --force-reinstall --no-deps
Attempt to start app.py.
python app.py
The onnxruntime and nvdiffrast-0.3.1 are installed and then the error occurs.
(venv) F:\Unique3D-main\venv\Unique3D>python app.py
Processing f:\unique3d-main\venv\unique3d\package\onnxruntime
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [17 lines of output]
Traceback (most recent call last):
File "F:\Unique3D-main\venv\lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Processing f:\unique3d-main\venv\unique3d\package\nvdiffrast-0.3.1
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: nvdiffrast
Building wheel for nvdiffrast (pyproject.toml) ... done
Created wheel for nvdiffrast: filename=nvdiffrast-0.3.1-py3-none-any.whl size=140631 sha256=43de6ac37419d83c92e67dda9378b8dbe886c1ed666ee59f1c567ccdd3860520
Stored in directory: c:\users\turug\appdata\local\pip\cache\wheels\0d\8c\44\a4ef772736e8147e4d25ce4c4466d6a1fde95e1f61bb05f663
Successfully built nvdiffrast
Installing collected packages: nvdiffrast
Successfully installed nvdiffrast-0.3.1
Traceback (most recent call last):
File "F:\Unique3D-main\venv\Unique3D\app.py", line 25, in python gradio_app\gradio_local.py --port 7860
An error is displayed.
(venv) F:\Unique3D-main\venv\Unique3D>python gradio_app\gradio_local.py --port 7860
Traceback (most recent call last):
File "F:\Unique3D-main\venv\Unique3D\gradio_app\gradio_local.py", line 20, in python gradio_app\gradio_local.py --port 7860
(venv) F:\Unique3D-main\venv\Unique3D>python gradio_app\gradio_local.py --port 7860
Traceback (most recent call last):
File "F:\Unique3D-main\venv\Unique3D\gradio_app\gradio_local.py", line 20, in
Originally in venv\Lib\site-packages\spaces\zero\gradio.py there is no try_ itself and def try_process_queue_event.
In venv\Lib\site-packages\spaces\zero\wrappers.py, lines 41 and 42 from .gradio import try_queue_event
This is probably a typo,
Modify line 41 of venv\Lib\site-packages\spaces\zero\wrappers.py, from .gradio import try_process_queue_event to try to start gradio_local.py.
result
(venv) F:\Unique3D-main\venv\Unique3D>python gradio_app\gradio_local.py --port 7860
Traceback (most recent call last):
File "F:\Unique3D-main\venv\Unique3D\gradio_app\gradio_local.py", line 20, in
I got as far as cloning pytorch3d's git.
try to start gradio_local.py.
result
(venv) F:\Unique3D-main\venv\Unique3D>python gradio_app\gradio_local.py --port 7860
Traceback (most recent call last):
File "F:\Unique3D-main\venv\Unique3D\gradio_app\gradio_local.py", line 20, in
Unique3D has too many dependencies of dependencies and more dependencies of dependencies I gave up installing on Windows.
My PC is not able to use the conda command after installing miniconda, is there any way to install locally without the conda command?