Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colab notebook doesn't work #50

Open
epris opened this issue Aug 1, 2023 · 7 comments
Open

Colab notebook doesn't work #50

epris opened this issue Aug 1, 2023 · 7 comments

Comments

@epris
Copy link

epris commented Aug 1, 2023

Hello,
I'm trying to run the Colab online demo but I obtain different errors at the runtime
1)```
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
torchdata 0.6.1 requires torch==2.0.1, but you have torch 1.11.0 which is incompatible.
torchtext 0.15.2 requires torch==2.0.1, but you have torch 1.11.0 which is incompatible.


2) `ERROR: Cannot install pyglet==1.5.27, pyopengl==3.1.5, pyrender==0.1, pyrender==0.1.1, pyrender==0.1.10, pyrender==0.1.11, pyrender==0.1.12, pyrender==0.1.13, pyrender==0.1.14, pyrender==0.1.15, pyrender==0.1.16, pyrender==0.1.17, pyrender==0.1.18, pyrender==0.1.2, pyrender==0.1.20, pyrender==0.1.21, pyrender==0.1.22, pyrender==0.1.23, pyrender==0.1.24, pyrender==0.1.25, pyrender==0.1.26, pyrender==0.1.27, pyrender==0.1.28, pyrender==0.1.29, pyrender==0.1.3, pyrender==0.1.30, pyrender==0.1.31, pyrender==0.1.32, pyrender==0.1.33, pyrender==0.1.34, pyrender==0.1.35, pyrender==0.1.36, pyrender==0.1.39, pyrender==0.1.4, pyrender==0.1.40, pyrender==0.1.41, pyrender==0.1.42, pyrender==0.1.43, pyrender==0.1.44, pyrender==0.1.45, pyrender==0.1.5, pyrender==0.1.6, pyrender==0.1.7, pyrender==0.1.8 and pyrender==0.1.9 because these package versions have conflicting dependencies.`

3) ```
Building wheels for collected packages: tokenizers, sacremoses
  error: subprocess-exited-with-error
  
  × Building wheel for tokenizers (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  Building wheel for tokenizers (pyproject.toml) ... error
  ERROR: Failed building wheel for tokenizers
Failed to build tokenizers
ERROR: Could not build wheels for tokenizers, which is required to install pyproject.toml-based projects
Hit:1 https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/ InRelease
Hit:2 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64  InRelease
Hit:3 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:4 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:5 https://ppa.launchpadcontent.net/c2d4u.team/c2d4u4.0+/ubuntu jammy InRelease
Hit:6 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:7 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:8 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy InRelease
Hit:9 https://ppa.launchpadcontent.net/graphics-drivers/ppa/ubuntu jammy InRelease
Hit:10 https://ppa.launchpadcontent.net/ubuntugis/ppa/ubuntu jammy InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
16 packages can be upgraded. Run 'apt list --upgradable' to see them.

4)```
Traceback (most recent call last):
File "/content/CodeTalker/main/demo.py", line 9, in
from transformers import Wav2Vec2Processor
ModuleNotFoundError: No module named 'transformers'

@enrico310786
Copy link

I have the same error. Any suggestions?

@Doubiiu
Copy link
Owner

Doubiiu commented Oct 31, 2023

Hi. It seems that google colab changes its default environment, which leads to setup error. I will update the colab code ASAP. :( I am sorry that I am currently busy working on an academic project :(

@itxtayab
Copy link

Still the same issue

@MohitPanpaliya
Copy link

still the same issue

@Doubiiu
Copy link
Owner

Doubiiu commented Mar 19, 2024

Prepare a new Colab notebook here. However, there are some artifacts in the VOCASET-template results due to the difference between the installed versions of packages and those in this repo/paper. It is hard to configure the environment in Colab to be the same as the one in this repo and I have tried my best.

@IH-Chung
Copy link

Prepare a new Colab notebook here. However, there are some artifacts in the VOCASET-template results due to the difference between the installed versions of packages and those in this repo/paper. It is hard to configure the environment in Colab to be the same as the one in this repo and I have tried my best.

In new Colab notebook show:

!sh scripts/demo.sh vocaset

/content/CodeTalker
Some weights of Wav2Vec2Model were not initialized from the model checkpoint at facebook/wav2vec2-base-960h and are newly initialized: ['wav2vec2.masked_spec_embed']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.
=> loading checkpoint 'vocaset/vocaset_stage2.pth.tar'
=> loaded checkpoint 'vocaset/vocaset_stage2.pth.tar'
Generating facial animation for demo/wav/man.wav...
2024-03-20 12:34:40.717035: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2024-03-20 12:34:40.717087: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2024-03-20 12:34:40.718591: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2024-03-20 12:34:41.921161: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Traceback (most recent call last):
  File "/content/CodeTalker/main/demo.py", line 219, in <module>
    main()
  File "/content/CodeTalker/main/demo.py", line 129, in main
    test(model, cfg.demo_wav_path, save_folder, condition, subject)
  File "/content/CodeTalker/main/demo.py", line 167, in test
    prediction = model.predict(audio_feature, template, one_hot)
  File "/content/CodeTalker/models/stage2.py", line 115, in predict
    hidden_states = self.audio_encoder(audio, self.dataset).last_hidden_state
  File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/content/CodeTalker/models/lib/wav2vec.py", line 132, in forward
    encoder_outputs = self.encoder(
  File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/transformers/models/wav2vec2/modeling_wav2vec2.py", line 787, in forward
    position_embeddings = self.pos_conv_embed(hidden_states)
  File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/transformers/models/wav2vec2/modeling_wav2vec2.py", line 399, in forward
    hidden_states = hidden_states.transpose(1, 2)
IndexError: Dimension out of range (expected to be in range of [-2, 1], but got 2)

!sh scripts/demo.sh BIWI

Some weights of Wav2Vec2Model were not initialized from the model checkpoint at facebook/wav2vec2-base-960h and are newly initialized: ['wav2vec2.masked_spec_embed']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.
=> loading checkpoint 'BIWI/biwi_stage2.pth.tar'
=> loaded checkpoint 'BIWI/biwi_stage2.pth.tar'
Generating facial animation for demo/wav/man.wav...
2024-03-20 12:37:31.046308: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2024-03-20 12:37:31.046378: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2024-03-20 12:37:31.048398: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2024-03-20 12:37:32.752418: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Traceback (most recent call last):
  File "/content/CodeTalker/main/demo.py", line 219, in <module>
    main()
  File "/content/CodeTalker/main/demo.py", line 129, in main
    test(model, cfg.demo_wav_path, save_folder, condition, subject)
  File "/content/CodeTalker/main/demo.py", line 167, in test
    prediction = model.predict(audio_feature, template, one_hot)
  File "/content/CodeTalker/models/stage2.py", line 115, in predict
    hidden_states = self.audio_encoder(audio, self.dataset).last_hidden_state
  File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/content/CodeTalker/models/lib/wav2vec.py", line 132, in forward
    encoder_outputs = self.encoder(
  File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/transformers/models/wav2vec2/modeling_wav2vec2.py", line 787, in forward
    position_embeddings = self.pos_conv_embed(hidden_states)
  File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/transformers/models/wav2vec2/modeling_wav2vec2.py", line 399, in forward
    hidden_states = hidden_states.transpose(1, 2)
IndexError: Dimension out of range (expected to be in range of [-2, 1], but got 2)

@amrzv
Copy link

amrzv commented Oct 17, 2024

FYI, colab notebook doesn't work

...
   1508 | PyArray_DATA(const PyArrayObject *arr)
        |              ~~~~~~~~~~~~~~~~~~~~~^~~
  error: command '/usr/bin/x86_64-linux-gnu-g++' failed with exit code 1
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /usr/bin/python3 -u -c '
  exec(compile('"'"''"'"''"'"'
  # This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
  #
  # - It imports setuptools before invoking setup.py, to enable projects that directly
  #   import from `distutils.core` to work with newer packaging standards.
  # - It provides a clear error message when setuptools is not installed.
  # - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
  #   setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning:
  #     manifest_maker: standard file '"'"'-c'"'"' not found".
  # - It generates a shim setup.py, for handling setup.cfg-only projects.
  import os, sys, tokenize
  
  try:
      import setuptools
  except ImportError as error:
      print(
          "ERROR: Can not execute `setup.py` since setuptools is not available in "
          "the build environment.",
          file=sys.stderr,
      )
      sys.exit(1)
  
  __file__ = %r
  sys.argv[0] = __file__
  
  if os.path.exists(__file__):
      filename = __file__
      with tokenize.open(__file__) as f:
          setup_py_code = f.read()
  else:
      filename = "<auto-generated setuptools caller>"
      setup_py_code = "from setuptools import setup; setup()"
  
  exec(compile(setup_py_code, filename, "exec"))
  '"'"''"'"''"'"' % ('"'"'/content/mesh/setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' bdist_wheel -d /tmp/pip-wheel-5xy5ak4p
  cwd: /content/mesh/
  Building wheel for psbody-mesh (setup.py) ... error
  ERROR: Failed building wheel for psbody-mesh
  Running setup.py clean for psbody-mesh
  Running command python setup.py clean
  [VERSION] read version is 0.4
  /usr/local/lib/python3.10/dist-packages/setuptools/__init__.py:94: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
  !!

          ********************************************************************************
          Requirements should be satisfied by a PEP 517 installer.
          If you are using pip, you can try `pip install --use-pep517`.
          ********************************************************************************

  !!
    dist.fetch_build_eggs(dist.setup_requires)
  /usr/local/lib/python3.10/dist-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'test_suite'
    warnings.warn(msg)
  /usr/local/lib/python3.10/dist-packages/setuptools/dist.py:694: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated.
  !!

          ********************************************************************************
          Please replace its usage with implicit namespaces (PEP 420).

          See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages for details.
          ********************************************************************************

  !!
    ep.load()(self, ep.name, value)
  running clean
  removing 'build/temp.linux-x86_64-cpython-310' (and everything under it)
  removing 'build/lib.linux-x86_64-cpython-310' (and everything under it)
  'build/bdist.linux-x86_64' does not exist -- can't clean it
  'build/scripts-3.10' does not exist -- can't clean it
  removing 'build'
Failed to build psbody-mesh
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (psbody-mesh)
make: *** [Makefile:7: all] Error 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants