fast-stable-diffusion: It gives me an error when executing the xformers installation in google colab
When executing the cell “Patching setup.py” I get that it can’t find the file /content/xformers/setup.py
The error is the following:
Writing /content/xformers/setup.py
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
[<ipython-input-10-91ff3c53b74d>](https://localhost:8080/#) in <module>
----> 1 get_ipython().run_cell_magic('writefile', '/content/xformers/setup.py', '#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n#\n# This source code is licensed under the BSD license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport distutils.command.clean\nimport glob\nimport os\nimport re\nimport shutil\nimport subprocess\nimport sys\nfrom pathlib import Path\n\nimport setuptools\nimport torch\nfrom torch.utils.cpp_extension import (\n CUDA_HOME,\n BuildExtension,\n CppExtension,\n CUDAExtension,\n)\n\nthis_dir = os.path.dirname(os.path.abspath(__file__))\n\n\ndef fetch_requirements():\n with open("requirements.txt") as f:\n reqs = f.read().strip().split("\\n")\n return reqs\n\n\n# [https://packaging.python.org/guides/single-sourcing-package-version/\ndef](https://packaging.python.org/guides/single-sourcing-package-version//ndef) find_version(version_file_path):\n with open(version_file_path) as version_file:\n version_match = re.search(\n r"^__version__ = [\'\\"]([^\'\\"]*)[\'\\"]", version_file.read(), re.M\n )\n # The following is used to build release packages.\n # Users should never use it.\n suffix = os.getenv("XFORMERS_VERSION_SUFFIX", "")\n if version_match:\n return version_match.group(1) + suffix\n raise RuntimeError("Unable to find ...
2 frames
<decorator-gen-98> in writefile(self, line, cell)
[/usr/local/lib/python3.7/dist-packages/IPython/core/magics/osm.py](https://localhost:8080/#) in writefile(self, line, cell)
846
847 mode = 'a' if args.append else 'w'
--> 848 with io.open(filename, mode, encoding='utf-8') as f:
849 f.write(cell)
FileNotFoundError: [Errno 2] No such file or directory: '/content/xformers/setup.py'
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (10 by maintainers)
use this one :
!git clone --branch gh/danthe3rd/35/orig https://github.com/facebookresearch/xformers.gityep, i’ll fix that line