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 Notebooks not working #35

Open
ThorJonsson opened this issue Apr 21, 2024 · 2 comments
Open

Colab Notebooks not working #35

ThorJonsson opened this issue Apr 21, 2024 · 2 comments

Comments

@ThorJonsson
Copy link

Hi, unfortunately the colab notebooks are not working due to the environment dependencies not being fixed for all packages leading to dependency conflicts.

In the colab notebook:

%pip install -r requirements.txt
#%pip install -q -U --pre triton
#%pip install -q diffusers[torch]==0.11.1 transformers==4.26.0 bitsandbytes==0.35.4
#decord accelerate omegaconf einops ftfy gradio imageio-ffmpeg xformers

whether I comment out the use of the requirements file or comment out the pip installations neither actually works in compiling all the packages being specified.

These dependency conflicts result in the following issue when using the test script:

20:49:24.079709: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
WARNING The following values were not passed to accelerate launch and

No other information is given but the result directory is empty after this happens. What is confusing to me is that neither TensorRT or Tensorflow is something that was found in the requirements file.

How can I get these notebooks working and reproduce these results?

@fre-mont
Copy link

fre-mont commented May 7, 2024

I also had this problem with "The following values were not passed to accelerate launch and" in colab demo, but I solve it as below;

from accelerate.utils import write_basic_config
write_basic_config()

Set this up and try running !accelerate launch test_fatezero.py --config=$CONFIG_NAME

@amrzv
Copy link

amrzv commented Jul 7, 2024

Hello.
Colab notebook still doesn't work.
On the line !accelerate launch test_fatezero.py --config=$CONFIG_NAME
getting

2024-07-07 15:13:10.348723: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Traceback (most recent call last):
  File "/content/FateZero/test_fatezero.py", line 16, in <module>
    from diffusers import (
  File "/usr/local/lib/python3.10/dist-packages/diffusers/__init__.py", line 46, in <module>
    from .pipeline_utils import DiffusionPipeline
  File "/usr/local/lib/python3.10/dist-packages/diffusers/pipeline_utils.py", line 38, in <module>
    from .schedulers.scheduling_utils import SCHEDULER_CONFIG_NAME
  File "/usr/local/lib/python3.10/dist-packages/diffusers/schedulers/__init__.py", line 51, in <module>
    from .scheduling_ddpm_flax import FlaxDDPMScheduler
  File "/usr/local/lib/python3.10/dist-packages/diffusers/schedulers/scheduling_ddpm_flax.py", line 80, in <module>
    class FlaxDDPMScheduler(FlaxSchedulerMixin, ConfigMixin):
  File "/usr/local/lib/python3.10/dist-packages/diffusers/schedulers/scheduling_ddpm_flax.py", line 216, in FlaxDDPMScheduler
    key: random.KeyArray,
  File "/usr/local/lib/python3.10/dist-packages/jax/_src/deprecations.py", line 54, in getattr
    raise AttributeError(f"module {module!r} has no attribute {name!r}")
AttributeError: module 'jax.random' has no attribute 'KeyArray'
Traceback (most recent call last):
  File "/usr/local/bin/accelerate", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/accelerate_cli.py", line 48, in main
    args.func(args)
  File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/launch.py", line 1097, in launch_command
    simple_launcher(args)
  File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/launch.py", line 703, in simple_launcher
    raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3', 'test_fatezero.py', '--config=config/teaser_car-turn.yaml']' returned non-zero exit status 1.

So the error is jax library AttributeError: module 'jax.random' has no attribute 'KeyArray'.
Solution: downgrade it to 0.4.23 (stackoverflow)
Either add pip installl jax==0.4.23 jaxlib==0.4.23 or specify dependencies in requirements.txt.

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

3 participants