Skip to content

Commit

Permalink
Modify xformers instead of pytorch
Browse files Browse the repository at this point in the history
  • Loading branch information
Sakura-Luna authored May 18, 2023
1 parent 9a9557e commit 96cba45
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ def run_extensions_installers(settings_file):


def prepare_environment():
torch_command = os.environ.get('TORCH_COMMAND', "pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 --extra-index-url https://download.pytorch.org/whl/cu118")
torch_index_url = os.environ.get('TORCH_INDEX_URL', "https://download.pytorch.org/whl/cu118")
torch_command = os.environ.get('TORCH_COMMAND', f"pip install torch==2.0.1 torchvision==0.15.2 --extra-index-url {torch_index_url}")
requirements_file = os.environ.get('REQS_FILE', "requirements_versions.txt")

xformers_package = os.environ.get('XFORMERS_PACKAGE', 'xformers==0.0.17')
Expand Down Expand Up @@ -292,7 +293,7 @@ def prepare_environment():
if not is_installed("xformers"):
exit(0)
elif platform.system() == "Linux":
run_pip(f"install {xformers_package}", "xformers")
run_pip(f"install -U -I --no-deps {xformers_package}", "xformers")

if not is_installed("pyngrok") and args.ngrok:
run_pip("install pyngrok", "ngrok")
Expand Down

0 comments on commit 96cba45

Please sign in to comment.