stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

Installation on Apple Silicon issue.

Open dylanluigi opened this issue 1 year ago • 19 comments

Describe the bug When trying to start the WebUI after the whole installation I get an error that seems to be coming from the webui.py

(base) dylan@Dylans-MacBook-Pro stable-diffusion-webui % ./run_webui_mac.sh
WARNING: overwriting environment variables set in the machine
overwriting variable PYTORCH_ENABLE_MPS_FALLBACK
Already up to date.
  File "webui.py", line 79
    print(f'Interrupted with signal {sig} in {frame}')
                                                    ^
SyntaxError: invalid syntax
(base) dylan@Dylans-MacBook-Pro stable-diffusion-webui % 
  • OS: macOS 12.0.1
  • CPU: Apple Silicon M1

dylanluigi avatar Sep 27 '22 17:09 dylanluigi

Re: Apple Silicon install, it also fails several of the wheel install steps of the initial requirements.txt step.

  Building wheel for basicsr (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [30 lines of output]
      /Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/h4/s3xv4kvd3ml28l094hxdkf0w0000gn/T/pip-install-2v4boawh/basicsr_ed6513ca9e694ce88a8b67093ab32f55/setup.py", line 147, in <module>
          setup(
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/setuptools/__init__.py", line 86, in setup
          _install_setup_requires(attrs)
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/setuptools/__init__.py", line 80, in _install_setup_requires
          dist.fetch_build_eggs(dist.setup_requires)
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/setuptools/dist.py", line 875, in fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/pkg_resources/__init__.py", line 789, in resolve
          dist = best[req.key] = env.best_match(
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1075, in best_match
          return self.obtain(req, installer)
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1087, in obtain
          return installer(requirement)
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/setuptools/dist.py", line 945, in fetch_build_egg
          return fetch_build_egg(self, req)
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/setuptools/installer.py", line 87, in fetch_build_egg
          wheel.install_as_egg(dist_location)
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/setuptools/wheel.py", line 96, in install_as_egg
          self._install_as_egg(destination_eggdir, zf)
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/setuptools/wheel.py", line 104, in _install_as_egg
          self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/setuptools/wheel.py", line 148, in _convert_metadata
          os.rename(dist_info, egg_info)
      OSError: [Errno 66] Directory not empty: '/private/var/folders/h4/s3xv4kvd3ml28l094hxdkf0w0000gn/T/pip-install-2v4boawh/basicsr_ed6513ca9e694ce88a8b67093ab32f55/.eggs/torch-1.12.1-py3.10-macosx-11.1-arm64.egg/torch-1.12.1.dist-info' -> '/private/var/folders/h4/s3xv4kvd3ml28l094hxdkf0w0000gn/T/pip-install-2v4boawh/basicsr_ed6513ca9e694ce88a8b67093ab32f55/.eggs/torch-1.12.1-py3.10-macosx-11.1-arm64.egg/EGG-INFO'
      [end of output]

kode54 avatar Sep 29 '22 08:09 kode54

I'm getting the following.

web-ui) wesley@Wesleys-MacBook-Air stable-diffusion-webui % ./run_webui_mac.sh zsh: no such file or directory: ./run_webui_mac.sh

Also, the file I have been trying to run appears to be empty.

swankwc avatar Oct 01 '22 03:10 swankwc

bump, same with me

RocketNinja15 avatar Oct 09 '22 23:10 RocketNinja15

same with me someone plz help me out. here's my discord: 813rico#4771

813rico avatar Oct 11 '22 00:10 813rico

They closed my issue when i tried to report the same problem.

813rico avatar Oct 11 '22 03:10 813rico

They closed my issue when i tried to report the same problem.

That's so strange

RocketNinja15 avatar Oct 11 '22 04:10 RocketNinja15

Okay, so I solved my issue after running different solutions, and found a project based on this webui a project based on this webui but fixes the issue that I had, meanwhile we wait for @AUTOMATIC1111 or somone else to say something. Firstly u got to uninstall all of your python versions from your system, and then reinstall the suggested version which I belive it to be Pyhton 3.10.6, now if you want to completly clean your python installations you should try this and after that delete all of your stable diffusion files from your system. After doing that I ran the following:

  1. Make sure you've got homebrew on your system.
  2. Open terminal.app
  3. Run bash <(curl -s https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/setup_mac.sh)
  4. The rest is all explained on the terminal window.

dylanluigi avatar Oct 11 '22 09:10 dylanluigi

@dylanluigi thank you for sharing this gem, ima try it out from the looks of it, it has the same functionalities as this version

813rico avatar Oct 11 '22 13:10 813rico

@dylanluigi how did u run that command? I keep getting this error, yes i have all dependencies! Screen Shot 2022-10-11 at 11 28 05 AM

813rico avatar Oct 11 '22 15:10 813rico

still having same issue someone please help me , here's my discord 813rico#4771

813rico avatar Oct 11 '22 16:10 813rico

still having same issue someone please help me , here's my discord 813rico#4771

did u install homebrew¿

dylanluigi avatar Oct 11 '22 19:10 dylanluigi

Okay, so I solved my issue after running different solutions, and found a project based on this webui a project based on this webui but fixes the issue that I had, meanwhile we wait for @AUTOMATIC1111 or somone else to say something. Firstly u got to uninstall all of your python versions from your system, and then reinstall the suggested version which I belive it to be Pyhton 3.10.6, now if you want to completly clean your python installations you should try this and after that delete all of your stable diffusion files from your system. After doing that I ran the following:

1. Make sure you've got [homebrew](https://brew.sh/)  on your system.

2. Open terminal.app

3. Run `bash <(curl -s https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/setup_mac.sh) `

4. The rest is all explained on the terminal window.

I think the curl link needs to be replaced. It references AUTOMATIC's not https://github.com/dylancl/stable-diffusion-webui-mps

RocketNinja15 avatar Oct 11 '22 23:10 RocketNinja15

Okay, so I solved my issue after running different solutions, and found a project based on this webui a project based on this webui but fixes the issue that I had, meanwhile we wait for @AUTOMATIC1111 or somone else to say something. Firstly u got to uninstall all of your python versions from your system, and then reinstall the suggested version which I belive it to be Pyhton 3.10.6, now if you want to completly clean your python installations you should try this and after that delete all of your stable diffusion files from your system. After doing that I ran the following:

1. Make sure you've got [homebrew](https://brew.sh/)  on your system.

2. Open terminal.app

3. Run `bash <(curl -s https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/setup_mac.sh) `

4. The rest is all explained on the terminal window.

I think the curl link needs to be replaced. It references AUTOMATIC's not https://github.com/dylancl/stable-diffusion-webui-mps

### Also for anyone interested, here is my paste:

https://pastebin.com/QCWYZzSZ

RocketNinja15 avatar Oct 12 '22 01:10 RocketNinja15

Re: Apple Silicon install, it also fails several of the wheel install steps of the initial requirements.txt step.

  Building wheel for basicsr (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [30 lines of output]
      /Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/h4/s3xv4kvd3ml28l094hxdkf0w0000gn/T/pip-install-2v4boawh/basicsr_ed6513ca9e694ce88a8b67093ab32f55/setup.py", line 147, in <module>
          setup(
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/setuptools/__init__.py", line 86, in setup
          _install_setup_requires(attrs)
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/setuptools/__init__.py", line 80, in _install_setup_requires
          dist.fetch_build_eggs(dist.setup_requires)
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/setuptools/dist.py", line 875, in fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/pkg_resources/__init__.py", line 789, in resolve
          dist = best[req.key] = env.best_match(
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1075, in best_match
          return self.obtain(req, installer)
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1087, in obtain
          return installer(requirement)
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/setuptools/dist.py", line 945, in fetch_build_egg
          return fetch_build_egg(self, req)
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/setuptools/installer.py", line 87, in fetch_build_egg
          wheel.install_as_egg(dist_location)
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/setuptools/wheel.py", line 96, in install_as_egg
          self._install_as_egg(destination_eggdir, zf)
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/setuptools/wheel.py", line 104, in _install_as_egg
          self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/setuptools/wheel.py", line 148, in _convert_metadata
          os.rename(dist_info, egg_info)
      OSError: [Errno 66] Directory not empty: '/private/var/folders/h4/s3xv4kvd3ml28l094hxdkf0w0000gn/T/pip-install-2v4boawh/basicsr_ed6513ca9e694ce88a8b67093ab32f55/.eggs/torch-1.12.1-py3.10-macosx-11.1-arm64.egg/torch-1.12.1.dist-info' -> '/private/var/folders/h4/s3xv4kvd3ml28l094hxdkf0w0000gn/T/pip-install-2v4boawh/basicsr_ed6513ca9e694ce88a8b67093ab32f55/.eggs/torch-1.12.1-py3.10-macosx-11.1-arm64.egg/EGG-INFO'
      [end of output]

Im getting this: https://pastebin.com/QCWYZzSZ

RocketNinja15 avatar Oct 12 '22 01:10 RocketNinja15

Describe the bug When trying to start the WebUI after the whole installation I get an error that seems to be coming from the webui.py

(base) dylan@Dylans-MacBook-Pro stable-diffusion-webui % ./run_webui_mac.sh
WARNING: overwriting environment variables set in the machine
overwriting variable PYTORCH_ENABLE_MPS_FALLBACK
Already up to date.
  File "webui.py", line 79
    print(f'Interrupted with signal {sig} in {frame}')
                                                    ^
SyntaxError: invalid syntax
(base) dylan@Dylans-MacBook-Pro stable-diffusion-webui % 
* OS: macOS 12.0.1

* CPU: Apple Silicon M1

exact same error that Im getting, are your depenances failing to install like me?

RocketNinja15 avatar Oct 12 '22 01:10 RocketNinja15

Describe the bug When trying to start the WebUI after the whole installation I get an error that seems to be coming from the webui.py

(base) dylan@Dylans-MacBook-Pro stable-diffusion-webui % ./run_webui_mac.sh
WARNING: overwriting environment variables set in the machine
overwriting variable PYTORCH_ENABLE_MPS_FALLBACK
Already up to date.
  File "webui.py", line 79
    print(f'Interrupted with signal {sig} in {frame}')
                                                    ^
SyntaxError: invalid syntax
(base) dylan@Dylans-MacBook-Pro stable-diffusion-webui % 
* OS: macOS 12.0.1

* CPU: Apple Silicon M1

exact same error that Im getting, are your depenances failing to install like me?

Seems you're running on base enviroment i belive u have to run the enviroment and after execute the ./run_webui_mac.sh

dylanluigi avatar Oct 17 '22 19:10 dylanluigi

Describe the bug When trying to start the WebUI after the whole installation I get an error that seems to be coming from the webui.py

(base) dylan@Dylans-MacBook-Pro stable-diffusion-webui % ./run_webui_mac.sh
WARNING: overwriting environment variables set in the machine
overwriting variable PYTORCH_ENABLE_MPS_FALLBACK
Already up to date.
  File "webui.py", line 79
    print(f'Interrupted with signal {sig} in {frame}')
                                                    ^
SyntaxError: invalid syntax
(base) dylan@Dylans-MacBook-Pro stable-diffusion-webui % 
* OS: macOS 12.0.1

* CPU: Apple Silicon M1

exact same error that Im getting, are your depenances failing to install like me?

Seems you're running on base enviroment i belive u have to run the enviroment and after execute the ./run_webui_mac.sh

Same issue still

RocketNinja15 avatar Oct 21 '22 16:10 RocketNinja15

If you want to get rid of this error, I found out that you can do the following:

conda env list to find all your environments.

conda activate <environment> to activate an environment. When you activate an environment, you should get a warning regarding the overwritten variable:

WARNING: overwriting environment variables set in the machine
overwriting variable PYTORCH_ENABLE_MPS_FALLBACK

If you run the command below (for all environments that show the above warning when activated)

conda env config vars unset PYTORCH_ENABLE_MPS_FALLBACK

The warning will disappear.

For me, the problem was that the base environment was also getting this variable set, so it would throw out this warning every time I opened a terminal. There's probably a bug where conda env config vars set PYTORCH_ENABLE_MPS_FALLBACK=1 is being set in the base environment in the webui script.

leetdavid avatar Nov 01 '22 08:11 leetdavid

Re: Apple Silicon install, it also fails several of the wheel install steps of the initial requirements.txt step.

  Building wheel for basicsr (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [30 lines of output]
      /Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/h4/s3xv4kvd3ml28l094hxdkf0w0000gn/T/pip-install-2v4boawh/basicsr_ed6513ca9e694ce88a8b67093ab32f55/setup.py", line 147, in <module>
          setup(
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/setuptools/__init__.py", line 86, in setup
          _install_setup_requires(attrs)
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/setuptools/__init__.py", line 80, in _install_setup_requires
          dist.fetch_build_eggs(dist.setup_requires)
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/setuptools/dist.py", line 875, in fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/pkg_resources/__init__.py", line 789, in resolve
          dist = best[req.key] = env.best_match(
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1075, in best_match
          return self.obtain(req, installer)
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1087, in obtain
          return installer(requirement)
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/setuptools/dist.py", line 945, in fetch_build_egg
          return fetch_build_egg(self, req)
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/setuptools/installer.py", line 87, in fetch_build_egg
          wheel.install_as_egg(dist_location)
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/setuptools/wheel.py", line 96, in install_as_egg
          self._install_as_egg(destination_eggdir, zf)
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/setuptools/wheel.py", line 104, in _install_as_egg
          self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
        File "/Users/chris/miniconda/envs/web-ui/lib/python3.10/site-packages/setuptools/wheel.py", line 148, in _convert_metadata
          os.rename(dist_info, egg_info)
      OSError: [Errno 66] Directory not empty: '/private/var/folders/h4/s3xv4kvd3ml28l094hxdkf0w0000gn/T/pip-install-2v4boawh/basicsr_ed6513ca9e694ce88a8b67093ab32f55/.eggs/torch-1.12.1-py3.10-macosx-11.1-arm64.egg/torch-1.12.1.dist-info' -> '/private/var/folders/h4/s3xv4kvd3ml28l094hxdkf0w0000gn/T/pip-install-2v4boawh/basicsr_ed6513ca9e694ce88a8b67093ab32f55/.eggs/torch-1.12.1-py3.10-macosx-11.1-arm64.egg/EGG-INFO'
      [end of output]

you ever find a solution to this? having same issue with the wheel installs

znazgo avatar Nov 02 '22 15:11 znazgo