Open coolkite opened 11 months ago
Hi coolkite,
This issue can be solved by setting the PYTHONPATH
env var:
export PYTHONPATH="."
or
PYTHONPATH="." python utils/export.py <your_ckpt> --type ply
You can also finish exporting by:
python -m utils.export
This also works in colab
Moving the export file outside the utils directory into the gsgen folder worked for me.
On Fri, Oct 13, 2023 at 4:27 AM Deng_Yao @.***> wrote:
i still got this problem after the operation according to the requirements [image: image] https://user-images.githubusercontent.com/87062331/274842794-b880e2ad-12ff-41b8-bb64-064cd34e1e52.png
— Reply to this email directly, view it on GitHub https://github.com/gsgen3d/gsgen/issues/13#issuecomment-1761121417, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK22S65BZTSHO2VGZHCECADX7D3NPAVCNFSM6AAAAAA54LGT32VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRRGEZDCNBRG4 . You are receiving this because you authored the thread.Message ID: @.***>
I run into the first problem too, didn't forget to set the pythonpath.
My command:
PYTHONPATH="." python utils/export.py /mnt/c/Users/Andy
/Documents/gsgen/checkpoints/baby_dragon_with_sunglasses_and_a_red_top_hat/2023-11-05/232556/ckpts/step_14000.pt --ty
pe ply
My result:
Traceback (most recent call last):
File "/mnt/c/Users/Andy/Documents/gsgen/utils/export.py", line 2, in <module>
import numpy as np
File "/home/user/miniconda3/envs/gsgen/lib/python3.10/site-packages/numpy/__init__.py", line 144, in <module>
from . import lib
File "/home/user/miniconda3/envs/gsgen/lib/python3.10/site-packages/numpy/lib/__init__.py", line 25, in <module>
from . import index_tricks
File "/home/user/miniconda3/envs/gsgen/lib/python3.10/site-packages/numpy/lib/index_tricks.py", line 12, in <module>
import numpy.matrixlib as matrixlib
File "/home/user/miniconda3/envs/gsgen/lib/python3.10/site-packages/numpy/matrixlib/__init__.py", line 4, in <module>
from . import defmatrix
File "/home/user/miniconda3/envs/gsgen/lib/python3.10/site-packages/numpy/matrixlib/defmatrix.py", line 12, in <module>
from numpy.linalg import matrix_power
File "/home/user/miniconda3/envs/gsgen/lib/python3.10/site-packages/numpy/linalg/__init__.py", line 73, in <module>
from . import linalg
File "/home/user/miniconda3/envs/gsgen/lib/python3.10/site-packages/numpy/linalg/linalg.py", line 20, in <module>
from typing import NamedTuple, Any
File "/mnt/c/Users/Andy/Documents/gsgen/utils/typing.py", line 12, in <module>
from typing import (
ImportError: cannot import name 'Any' from partially initialized module 'typing' (most likely due to a circular import) (/mnt/c/Users/Andy/Documents/gsgen/utils/typing.py)
Are there any other tips you have?
Using python -m utils.export <your_ckpt> --type <export_type>
will solve this problem.
Using
python -m utils.export <your_ckpt> --type <export_type>
will solve this problem.
Yes, that worked for me, thanks a lot! Could you also tell me why that is, so I can learn what happened (wrongly) please?
The file typing.py
shares the same name with python built-in typing package, the -m
flag tells python to load from the current working directory first. You can refer official documentation for details.
The file
typing.py
shares the same name with python built-in typing package, the-m
flag tells python to load from the current working directory first. You can refer official documentation for details.
Thanks!
Hi,
While trying to convert the .pt to .ply file using the script in utils/export.py, I encountered a few import related errors.
Moving export.py to /gsgen and then installing the plyfile library seemed to fix this issue.