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

OSError pytorch #64

Open
yolichek opened this issue May 9, 2024 · 1 comment
Open

OSError pytorch #64

yolichek opened this issue May 9, 2024 · 1 comment

Comments

@yolichek
Copy link

yolichek commented May 9, 2024

When run via jupyter :

WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
PyTorch 2.0.1+cu118 with CUDA 1108 (you have 2.0.1+cpu)
Python 3.10.11 (you have 3.10.14)
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

torch.cuda.is_available()
False

OSError: Error no file named pytorch_model.bin, tf_model.h5, model.ckpt.index or flax_model.msgpack found in directory C:\Users...

@HowlingNitin
Copy link

  1. Reinstall xFormers:

    • Follow the instructions provided in the warning message:
      pip uninstall xformers
      pip install xformers --extra-index-url https://download.pytorch.org/whl/cu118
    • This will reinstall xFormers with the correct CUDA support for your environment (assuming your GPU is compatible with CUDA 11.8).

    If your GPU doesn't support CUDA 11.8:

    • Check the xFormers documentation for compatible CUDA versions and reinstall with the appropriate version using the --extra-index-url option.
    • Consider upgrading your GPU drivers if necessary.
  2. Locate or Provide the Model File:

    • Make sure the model file you're trying to load exists in the specified directory (C:\Users...). Double-check the path and filename.
    • If the model file isn't generated by your code, ensure you have downloaded it from the correct source.

Additional Tips:

  • CUDA Compatibility: Check your NVIDIA GPU's compute capability to ensure it's compatible with the required CUDA version. You can find this information using the nvidia-smi command in your terminal or by searching for your GPU model online.
  • CUDA Environment Setup: If you haven't already, ensure you have CUDA Toolkit and the necessary cuDNN libraries installed. Refer to the PyTorch documentation for instructions on setting up a CUDA environment: https://pytorch.org/
  • Jupyter Kernel Restart: After reinstalling xFormers and (if applicable) updating your environment, restart your Jupyter kernel to ensure the changes take effect.

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