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.71k stars 118 forks source link

ModuleNotFoundError: No module named 'mv_unet' #48

Closed PaulHSch closed 7 months ago

PaulHSch commented 7 months ago

Hey, very cool project but I'm having issues getting it to run. When trying to run 'python app.py big --resume pretrained/model_fp16_fixrot.safetensors', I get the following error: /home/paul/git/LGM/core/attention.py:22: UserWarning: xFormers is available (Attention) warnings.warn("xFormers is available (Attention)") [INFO] Loaded checkpoint from pretrained/model_fp16_fixrot.safetensors Keyword arguments {'trust_remote_code': True} are not expected by MVDreamPipeline and will be ignored. Traceback (most recent call last): File "/home/paul/git/LGM/app.py", line 56, in pipe_text = MVDreamPipeline.from_pretrained( File "/home/paul/miniconda3/envs/prolific/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py", line 1063, in from_pretrained loaded_sub_model = load_sub_model( File "/home/paul/miniconda3/envs/prolific/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py", line 370, in load_sub_model class_obj, class_candidates = get_class_obj_and_candidates( File "/home/paul/miniconda3/envs/prolific/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py", line 318, in get_class_obj_and_candidates library = importlib.import_module(library_name) File "/home/paul/miniconda3/envs/prolific/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'mv_unet'

Any help would be appreciated!

ashawkey commented 7 months ago

@PaulHSch Hi, what's the version of diffusers in your env? Can you update it and try again?

PaulHSch commented 7 months ago

Diffusers was at version 0.17, updating to 0.27.2 did fix it. Thank you very much!

VLadImirluren commented 1 month ago

@PaulHSch Hi, what's the version of diffusers in your env? Can you update it and try again?

still error after update diffusers to 0.27 and the latest version (0.31.0)

/mnt/pfs/users/dengken/code/reconstruction_method/LGM/core/attention.py:22: UserWarning: xFormers is available (Attention) warnings.warn("xFormers is available (Attention)") [INFO] Loaded checkpoint from pretrained/model_fp16.safetensors Keyword arguments {'trust_remote_code': True} are not expected by MVDreamPipeline and will be ignored. Loading pipeline components...: 0%| | 0/5 [00:00<?, ?it/s] ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ /mnt/pfs/users/dengken/code/reconstruction_method/LGM/infer.py:58 in │ │ │ │ 55 proj_matrix[2, 3] = 1 │ │ 56 │ │ 57 # load image dream │ │ ❱ 58 pipe = MVDreamPipeline.from_pretrained( │ │ 59 │ "/mnt/pfs/users/dengken/code/reconstruction_method/mvdream_diffusers/weights_mvdream │ │ 60 │ torch_dtype=torch.float16, │ │ 61 │ trust_remote_code=True, │ │ │ │ /usr/local/lib/python3.9/dist-packages/huggingface_hub/utils/_validators.py:114 in _inner_fn │ │ │ │ 111 │ │ if check_use_auth_token: │ │ 112 │ │ │ kwargs = smoothly_deprecate_use_auth_token(fn_name=fn.name, has_token=ha │ │ 113 │ │ │ │ ❱ 114 │ │ return fn(*args, **kwargs) │ │ 115 │ │ │ 116 │ return _inner_fn # type: ignore │ │ 117 │ │ │ │ /usr/local/lib/python3.9/dist-packages/diffusers/pipelines/pipeline_utils.py:896 in │ │ from_pretrained │ │ │ │ 893 │ │ │ │ loaded_sub_model = passed_class_obj[name] │ │ 894 │ │ │ else: │ │ 895 │ │ │ │ # load sub model │ │ ❱ 896 │ │ │ │ loaded_sub_model = load_sub_model( │ │ 897 │ │ │ │ │ library_name=library_name, │ │ 898 │ │ │ │ │ class_name=class_name, │ │ 899 │ │ │ │ │ importable_classes=importable_classes, │ │ │ │ /usr/local/lib/python3.9/dist-packages/diffusers/pipelines/pipeline_loading_utils.py:614 in │ │ load_sub_model │ │ │ │ 611 │ │ │ 612 │ # retrieve class candidates │ │ 613 │ │ │ ❱ 614 │ class_obj, class_candidates = get_class_obj_and_candidates( │ │ 615 │ │ library_name, │ │ 616 │ │ class_name, │ │ 617 │ │ importable_classes, │ │ │ │ /usr/local/lib/python3.9/dist-packages/diffusers/pipelines/pipeline_loading_utils.py:296 in │ │ get_class_obj_and_candidates │ │ │ │ 293 │ │ class_candidates = {c: class_obj for c in importable_classes.keys()} │ │ 294 │ else: │ │ 295 │ │ # else we just import it from the library. │ │ ❱ 296 │ │ library = importlib.import_module(library_name) │ │ 297 │ │ │ │ 298 │ │ class_obj = getattr(library, class_name) │ │ 299 │ │ class_candidates = {c: getattr(library, c, None) for c in importable_classes.key │ │ │ │ /usr/lib/python3.9/importlib/init.py:127 in import_module │ │ │ │ 124 │ │ │ if character != '.': │ │ 125 │ │ │ │ break │ │ 126 │ │ │ level += 1 │ │ ❱ 127 │ return _bootstrap._gcd_import(name[level:], package, level) │ │ 128 │ │ 129 │ │ 130 _RELOADING = {} │ │ in _gcd_import:1030 │ │ in _find_and_load:1007 │ │ in _find_and_load_unlocked:984 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ ModuleNotFoundError: No module named 'mv_unet'