3DTopia / LGM

[ECCV 2024 Oral] LGM: Large Multi-View Gaussian Model for High-Resolution 3D Content Creation.
https://me.kiui.moe/lgm/
MIT License
1.57k stars 102 forks source link

TypeError: expected str, bytes or os.PathLike object, not NoneType #59

Open Huangkangxian opened 3 months ago

Huangkangxian commented 3 months ago

When I tried to run "python infer.py big --resume pretrained/model_fp16.safetensors --workspace workspace_test --test_path data_test", I got this bug:

Traceback (most recent call last): File "/data/hkx/Code/LGM-main/infer.py", line 166, in process(opt, path) File "/data/hkx/Code/LGM-main/infer.py", line 157, in process imageio.mimwrite(os.path.join(opt.workspace, name + '.mp4'), images, fps=30) File "/data/hkx/anaconda3/envs/3dgen/lib/python3.9/site-packages/imageio/v2.py", line 495, in mimwrite return file.write(ims, is_batch=True, **kwargs) File "/data/hkx/anaconda3/envs/3dgen/lib/python3.9/site-packages/imageio/core/legacy_plugin_wrapper.py", line 253, in write writer.append_data(image, metadata) File "/data/hkx/anaconda3/envs/3dgen/lib/python3.9/site-packages/imageio/core/format.py", line 590, in append_data return self._append_data(im, total_meta) File "/data/hkx/anaconda3/envs/3dgen/lib/python3.9/site-packages/imageio/plugins/ffmpeg.py", line 587, in _append_data self._initialize() File "/data/hkx/anaconda3/envs/3dgen/lib/python3.9/site-packages/imageio/plugins/ffmpeg.py", line 648, in _initialize self._write_gen.send(None) File "/data/hkx/anaconda3/envs/3dgen/lib/python3.9/site-packages/imageio_ffmpeg/_io.py", line 508, in write_frames codec = get_first_available_h264_encoder() File "/data/hkx/anaconda3/envs/3dgen/lib/python3.9/site-packages/imageio_ffmpeg/_io.py", line 124, in get_first_available_h264_encoder compiled_encoders = get_compiled_h264_encoders() File "/data/hkx/anaconda3/envs/3dgen/lib/python3.9/site-packages/imageio_ffmpeg/_io.py", line 58, in get_compiled_h264_encoders cmd = [get_ffmpeg_exe(), "-hide_banner", "-encoders"] File "/data/hkx/anaconda3/envs/3dgen/lib/python3.9/site-packages/imageio_ffmpeg/_utils.py", line 28, in get_ffmpeg_exe exe = _get_ffmpeg_exe() File "/data/hkx/anaconda3/envs/3dgen/lib/python3.9/site-packages/imageio_ffmpeg/_utils.py", line 44, in _get_ffmpeg_exe exe = os.path.join(_get_bin_dir(), FNAME_PER_PLATFORM.get(plat, "")) File "/data/hkx/anaconda3/envs/3dgen/lib/python3.9/site-packages/imageio_ffmpeg/_utils.py", line 69, in _get_bin_dir ref = importlib.resources.files("imageio_ffmpeg.binaries") / "init.py" File "/data/hkx/anaconda3/envs/3dgen/lib/python3.9/importlib/resources.py", line 147, in files return _common.from_package(_get_package(package)) File "/data/hkx/anaconda3/envs/3dgen/lib/python3.9/importlib/_common.py", line 14, in from_package return fallback_resources(package.spec) File "/data/hkx/anaconda3/envs/3dgen/lib/python3.9/importlib/_common.py", line 18, in fallback_resources package_directory = pathlib.Path(spec.origin).parent File "/data/hkx/anaconda3/envs/3dgen/lib/python3.9/pathlib.py", line 1082, in new self = cls._from_parts(args, init=False) File "/data/hkx/anaconda3/envs/3dgen/lib/python3.9/pathlib.py", line 707, in _from_parts drv, root, parts = self._parse_args(args) File "/data/hkx/anaconda3/envs/3dgen/lib/python3.9/pathlib.py", line 691, in _parse_args a = os.fspath(a) TypeError: expected str, bytes or os.PathLike object, not NoneType

Could you please tell me how to fix it?

HaFred commented 3 months ago

I met the same issue. Turns out it's caused by the package version. Downgrading it into these work fine. image

Huangkangxian commented 3 months ago

I met the same issue. Turns out it's caused by the package version. Downgrading it into these work fine. image

Thank you very much for your answer! I just reinstalled this package as well and it was solved!Thanks!!