mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2024-11-21 15:53:17 +01:00
Page:
xFormers
Pages
AMD on Linux
Clip Skip
Config settings
ControlNet
Copy settings
Custom Models
Custom Modifiers
Embeddings
Home
How to Use
Image Modifiers
Inpainting
Installation
LoRA
Model Merging
Prompt Syntax
Rendering performance
Run on Multiple GPUs
SDXL
Samplers
Seamless Tiling
The beta channel
Troubleshooting
UI Overview
UI Plugins
VAE Variational Auto Encoder
Writing prompts
xFormers
15
xFormers
JeLuF edited this page 2023-10-18 21:45:49 +02:00
Table of Contents
xFormers can speed up image generation (nearly twice as fast) and use less GPU memory. It's widely used and works quite well, but it can sometimes produce different images (for the same prompt+settings) compared to what you generated previously.
Important!! xFormers will only help on PCs with NVIDIA GPUs. It is not useful on CPU-only computers or M1/M2 Macs.
Installing xFormers
- Double-click
Developer Console.cmd
(on Windows) or run./developer_console.sh
(on Linux/Mac) - Run
python -m pip show torch torchvision
(important: please make a note of these two versions, incase you need to revert back to them) - Run the follow command:
python -m pip install --upgrade torch==2.0.1+cu118 torchvision==0.15.2+cu118 xformers==0.0.22 --extra-index-url https://download.pytorch.org/whl/cu118
or use the command generator (at the top of the page) from pytorch. That should be enough, you can now start Easy Diffusion like normal.
Removing/uninstalling xFormers
If you face any issues, please rollback by:
- Double-click
Developer Console.cmd
(on Windows) or run./developer_console.sh
(on Linux/Mac) - Run
python -m pip uninstall xformers
- Optionally, revert the
torch
andtorchvision
version to what you had previously:
- Windows or Linux: Run
python -m pip install torch==version_noted_above torchvision==version_noted_above --index-url https://download.pytorch.org/whl/cu116
- Mac: Run
python -m pip install torch==version_noted_above torchvision==version_noted_above