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.56k stars 100 forks source link

Problem with following steps #53

Open AlexGaida opened 4 months ago

AlexGaida commented 4 months ago
PS D:\Work\Pipeline\LGM> python app.py big --resume pretrained/model_fp16.safetensors
Traceback (most recent call last):
  File "D:\Work\Pipeline\LGM\app.py", line 6, in <module>
    import torch
  File "C:\Users\gaida\AppData\Roaming\Python\Python310\site-packages\torch\__init__.py", line 141, in <module>
    raise err
OSError: [WinError 126] The specified module could not be found. Error loading "C:\Users\gaida\AppData\Roaming\Python\Python310\site-packages\torch\lib\shm.dll" or one of its dependencies.

I thought the solution to the above problem was to downgrade version but then I came to another problem. python -m pip install torch==2.0.0 torchvision==0.15.1 torchaudio==2.0.1 --index-url https://download.pytorch.org/whl/cpu

WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
    PyTorch 2.2.2+cu118 with CUDA 1108 (you have 2.0.0+cpu)
    Python  3.10.11 (you have 3.10.6)
  Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers)
  Memory-efficient attention, SwiGLU, sparse and more won't be available.
  Set XFORMERS_MORE_DETAILS=1 for more details
Traceback (most recent call last):
  File "D:\Work\Pipeline\LGM\app.py", line 19, in <module>
    from core.models import LGM
  File "D:\Work\Pipeline\LGM\core\models.py", line 9, in <module>
    from core.unet import UNet
  File "D:\Work\Pipeline\LGM\core\unet.py", line 9, in <module>
    from core.attention import MemEffAttention
  File "D:\Work\Pipeline\LGM\core\attention.py", line 19, in <module>
    from xformers.ops import memory_efficient_attention, unbind
  File "C:\Users\gaida\AppData\Roaming\Python\Python310\site-packages\xformers\__init__.py", line 12, in <module>
    from .checkpoint import (  # noqa: E402, F401
  File "C:\Users\gaida\AppData\Roaming\Python\Python310\site-packages\xformers\checkpoint.py", line 464, in <module>
    class SelectiveCheckpointWrapper(ActivationWrapper):
  File "C:\Users\gaida\AppData\Roaming\Python\Python310\site-packages\xformers\checkpoint.py", line 481, in SelectiveCheckpointWrapper
    @torch.compiler.disable
AttributeError: module 'torch' has no attribute 'compiler'

Your help is much appreaciated!

iiiCpu commented 3 months ago

You installed CPU torch and GPU xformers, therefore you have conflict in versions. Reinstall them all for either CPU or GPU. python -m pip install torch==2.0.0 torchvision==0.15.1 torchaudio==2.0.1 xformers