Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with following steps #53

Open
AlexGaida opened this issue May 1, 2024 · 1 comment
Open

Problem with following steps #53

AlexGaida opened this issue May 1, 2024 · 1 comment

Comments

@AlexGaida
Copy link

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
Copy link

iiiCpu commented May 25, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants