Skip to content

Instantly share code, notes, and snippets.

@FurkanGozukara
Last active April 6, 2023 02:02
Show Gist options
  • Save FurkanGozukara/e90228e159fd502526afa7c5a8104069 to your computer and use it in GitHub Desktop.
Save FurkanGozukara/e90228e159fd502526afa7c5a8104069 to your computer and use it in GitHub Desktop.
How to use Torch 1.13 and latest xformers on Windows
our channel https://www.youtube.com/@SECourses
our discord : https://discord.com/servers/software-engineering-courses-secourses-772774097734074388
First watch this tutorial video to learn : https://youtu.be/pom3nQejaTs
activate venv
execute below command
pip3 install torch==1.13.1 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117
execute below command
pip install https://huggingface.co/MonsterMMORPG/SECourses/resolve/main/xformers-0.0.18.dev489-cp310-cp310-win_amd64.whl
and now you are using torch 1.13 with latest xformers - this is using lesser vram than torch 2 in some cases
@FurkanGozukara
Copy link
Author

FurkanGozukara commented Apr 6, 2023

Hi, I am a big fan of your youtube tutorials. Today I installed Pytorch 2.0.0+cu118 for my Auto1111 as per your recent dreambooth tutorial, and uninstalled PyTorch version 1.13.1+cu117. I also ran "pip install https://huggingface.co/MonsterMMORPG/SECourses/resolve/main/xformers-0.0.18.dev489-cp310-cp310-win_amd64.whl" after activating venv in my A1111 venv script folder. I upgraded to Torch 2 and upgraded xformers hoping to get better spped for my GPU 4090 Nvidia

Ever since then I get error whenever I generate images over 768 size. The errors also indicate that the xFormers library is not properly installed or compatible with my current environment. The warning message specifies that xFormers was built for:

PyTorch 1.13.1+cu117 with CUDA 1107 (I have 2.0.0+cu118) Python 3.10.10 (I have 3.10.6)

Can you suggest any solution. I would really appreciate it. Should I Downgrade PyTorch to version 1.13.1+cu117 and make sure it's built with CUDA 11.07? Should I Upgrade my Python version to 3.10.10? (But Automatic1111 is compatible with 3.10.6) Should I Reinstall the xFormers library? If yes, then to which version?

Any hints/tips or solutions will be very much appreciated. Thanks in advance.

hello and welcome. sorry for late reply.

you shouldn't use this version posted here. this post was made for GTX 1080 GPU . RTX 4090 works best with latest Pytorch and xformers.

I suggest you to watch this tutorial. I think I have replied you already but replying again for if anyone else reads : How To Install New DREAMBOOTH & Torch 2 On Automatic1111 Web UI PC For Epic Performance Gains Guide

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment