Skip to content

Commit

Permalink
Remove xFormers as PyTorch now good enough
Browse files Browse the repository at this point in the history
close #24
  • Loading branch information
YanWenKun committed Mar 9, 2024
1 parent 2c437df commit 48ac30a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
26 changes: 16 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,27 @@ RUN --mount=type=cache,target=/root/.cache/pip \
pip install --break-system-packages \
--upgrade pip

# Install xFormers (stable version, will specify PyTorch version)
# and Torchvision + Torchaudio (will downgrade to match xFormers' PyTorch version)
# Install PyTorch
RUN --mount=type=cache,target=/root/.cache/pip \
pip install --break-system-packages \
xformers torchvision torchaudio \
torch torchvision torchaudio \
--index-url https://download.pytorch.org/whl/cu121 \
--extra-index-url https://pypi.org/simple

# Upgrade xFormers to dev version
# (While keeping most dependencies at stable version)
RUN --mount=type=cache,target=/root/.cache/pip \
pip install --break-system-packages \
--pre --upgrade xformers \
--index-url https://download.pytorch.org/whl/cu121 \
--extra-index-url https://pypi.org/simple
# For anyone who want to use xFormers, uncomment code block below, and comment "PyTorch" part above.
# This code block will be removed in future.
## Install xFormers (stable version, will specify PyTorch version),
## and Torchvision + Torchaudio (will downgrade to match xFormers' PyTorch version).
## Then upgrade xFormers to dev version, while keeping most dependencies at stable version.
# RUN --mount=type=cache,target=/root/.cache/pip \
# pip install --break-system-packages \
# xformers torchvision torchaudio \
# --index-url https://download.pytorch.org/whl/cu121 \
# --extra-index-url https://pypi.org/simple \
# && pip install --break-system-packages \
# --pre --upgrade xformers \
# --index-url https://download.pytorch.org/whl/cu121 \
# --extra-index-url https://pypi.org/simple

# Install ONNX Runtime(ORT) for CUDA 12.x
# ORT is used by DWPose by controlnet_aux. But current ORT release on PyPI only supports CUDA 11.8.
Expand Down
Loading

0 comments on commit 48ac30a

Please sign in to comment.