fast Stable Diffusion 3x speed boost with Torch2+X-formers

Опубликовано: 10 Апрель 2026
на канале: ImpactFrames
20,243
241

#stablediffusion #aiart #controlnet #rig
(*・‿・)ノ⌒*:・゚✧ join   / aitechtips   for tips on everything Ai related
https://ko-fi.com/impactframes

add --opt-sdp-attention or --opt-sdp-no-mem-attention to the args line in user-webui.bat
add accelerate==0.18.0 to requirements.txt and requirements_version.txt


Windows and Linux
cd venv/Scripts
./activate
pip install --force-reinstall torch torchvision --index-url https://download.pytorch.org/whl/cu118
pip install --force-reinstall --no-deps --pre xformers

if you can't find torch try
pip3 install --force-reinstall torch torchvision torchaudio
pip install --force-reinstall --no-deps --pre xformers

for MacOS
cd venv/Scripts
activate
pip install --force-reinstall --pre torch torchvision --index-url https://download.pytorch.org/whl/nigh...
pip install --force-reinstall --no-deps --pre xformers

https://github.com/d8ahazard/sd_dream...

(advanced users only)
to compile the models to torch you will need the nightly version of torch2 to get Dynamo
read this https://github.com/AUTOMATIC1111/stab...
is out of the scope of my video and you need to know what you are doing you will need to modify the sd_hijack.py inside the modules folder as described on the optimize section of this link