nateraw / stable-diffusion-videos

Create 🔥 videos with Stable Diffusion by exploring the latent space and morphing between text prompts
Apache License 2.0
4.34k stars 413 forks source link

Issue with Installation #170

Open morphogencc opened 1 year ago

morphogencc commented 1 year ago

I'm trying to install the repo via pip. I'm running Python 3.8.0 and pip 23.0.1.

Just like on the homepage, I ran:

pip install -U stable_diffusion_videos

And had an issue installed basicsr:

Collecting stable_diffusion_videos
  Using cached stable_diffusion_videos-0.8.1-py3-none-any.whl (38 kB)
Collecting librosa
  Using cached librosa-0.10.0-py3-none-any.whl (252 kB)
Collecting fire
  Using cached fire-0.5.0.tar.gz (88 kB)
  Preparing metadata (setup.py) ... done
Collecting gradio
  Using cached gradio-3.19.1-py3-none-any.whl (14.2 MB)
Collecting diffusers==0.11.1
  Using cached diffusers-0.11.1-py3-none-any.whl (524 kB)
Collecting scipy
  Using cached scipy-1.10.1-cp38-cp38-win_amd64.whl (42.2 MB)
Collecting transformers>=4.21.0
  Using cached transformers-4.26.1-py3-none-any.whl (6.3 MB)
Collecting realesrgan==0.2.5.0
  Using cached realesrgan-0.2.5.0-py3-none-any.whl (25 kB)
Collecting av<10.0.0
  Using cached av-9.2.0-cp38-cp38-win_amd64.whl (24.4 MB)
Collecting importlib-metadata
  Using cached importlib_metadata-6.0.0-py3-none-any.whl (21 kB)
Collecting huggingface-hub>=0.10.0
  Using cached huggingface_hub-0.12.1-py3-none-any.whl (190 kB)
Collecting numpy
  Using cached numpy-1.24.2-cp38-cp38-win_amd64.whl (14.9 MB)
Collecting filelock
  Using cached filelock-3.9.0-py3-none-any.whl (9.7 kB)
Collecting requests
  Using cached requests-2.28.2-py3-none-any.whl (62 kB)
Collecting Pillow
  Using cached Pillow-9.4.0-cp38-cp38-win_amd64.whl (2.5 MB)
Collecting regex!=2019.12.17
  Using cached regex-2022.10.31-cp38-cp38-win_amd64.whl (267 kB)
Collecting facexlib>=0.2.0.3
  Using cached facexlib-0.2.5-py3-none-any.whl (59 kB)
Collecting torchvision
  Using cached torchvision-0.14.1-cp38-cp38-win_amd64.whl (1.1 MB)
Collecting gfpgan>=0.2.1
  Using cached gfpgan-1.3.8-py3-none-any.whl (52 kB)
Collecting torch>=1.7
  Using cached torch-1.13.1-cp38-cp38-win_amd64.whl (162.6 MB)
Collecting opencv-python
  Using cached opencv_python-4.7.0.72-cp37-abi3-win_amd64.whl (38.2 MB)
Collecting basicsr>=1.3.3.11
  Using cached basicsr-1.4.2.tar.gz (172 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [38 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\User\AppData\Local\Temp\pip-install-c4a4ukdm\basicsr_23c1a64c152149be84c144fda2cae2ac\setup.py", line 147, in <module>
          setup(
        File "d:\apps\interactiveimpressions\env\lib\site-packages\setuptools\__init__.py", line 144, in setup
          _install_setup_requires(attrs)
        File "d:\apps\interactiveimpressions\env\lib\site-packages\setuptools\__init__.py", line 139, in _install_setup_requires
          dist.fetch_build_eggs(dist.setup_requires)
        File "d:\apps\interactiveimpressions\env\lib\site-packages\setuptools\dist.py", line 716, in fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
        File "d:\apps\interactiveimpressions\env\lib\site-packages\pkg_resources\__init__.py", line 780, in resolve
          dist = best[req.key] = env.best_match(
        File "d:\apps\interactiveimpressions\env\lib\site-packages\pkg_resources\__init__.py", line 1065, in best_match
          return self.obtain(req, installer)
        File "d:\apps\interactiveimpressions\env\lib\site-packages\pkg_resources\__init__.py", line 1077, in obtain
          return installer(requirement)
        File "d:\apps\interactiveimpressions\env\lib\site-packages\setuptools\dist.py", line 786, in fetch_build_egg
          return cmd.easy_install(req)
        File "d:\apps\interactiveimpressions\env\lib\site-packages\setuptools\command\easy_install.py", line 679, in easy_install
          return self.install_item(spec, dist.location, tmpdir, deps)
        File "d:\apps\interactiveimpressions\env\lib\site-packages\setuptools\command\easy_install.py", line 705, in install_item
          dists = self.install_eggs(spec, download, tmpdir)
        File "d:\apps\interactiveimpressions\env\lib\site-packages\setuptools\command\easy_install.py", line 855, in install_eggs
          return [self.install_wheel(dist_filename, tmpdir)]
        File "d:\apps\interactiveimpressions\env\lib\site-packages\setuptools\command\easy_install.py", line 1068, in install_wheel
          self.execute(
        File "C:\Python38\lib\distutils\cmd.py", line 335, in execute
          util.execute(func, args, msg, dry_run=self.dry_run)
        File "C:\Python38\lib\distutils\util.py", line 303, in execute
          func(*args)
        File "d:\apps\interactiveimpressions\env\lib\site-packages\setuptools\wheel.py", line 101, in install_as_egg
          self._install_as_egg(destination_eggdir, zf)
        File "d:\apps\interactiveimpressions\env\lib\site-packages\setuptools\wheel.py", line 105, in _install_as_egg
          dist_info = self.get_dist_info(zf)
        File "d:\apps\interactiveimpressions\env\lib\site-packages\setuptools\wheel.py", line 96, in get_dist_info
          raise ValueError("unsupported wheel format. .dist-info not found")
      ValueError: unsupported wheel format. .dist-info not found
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

This doesn't necessarily look like an issue with this repo as much with a dependency (and not even a direct dependency, but a nested one), but does anyone have any suggestions for how to get past it?

ndelib commented 1 year ago

hey mate - I ran into this problem too. Fixed it by upgrading my version of pip (the python package installer) to version 23.1.2. I did so by running this command on Ubuntu 20.04: python3 -m pip install --upgrade pip. Hope that helps!

nateraw commented 1 year ago

Nice, thank you @ndelib! Anybody else who has/is running into this issue, can you try upgrading pip and see what happens?

If issues still occurring, please provide a way for me to reproduce the issue if you can :).

dibg commented 7 months ago

Issue still exists. My system is arch with pip-23.1.2 and python 3.11.5

Anning01 commented 6 months ago

Try first: pip install --upgrade setuptools wheel

If this still does not work, please execute the following command. pip install --use-pep517 basicsr

Successful!