Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

AnimateDiff Runtime error #85

Open
demonllord opened this issue Dec 2, 2023 · 0 comments
Open

AnimateDiff Runtime error #85

demonllord opened this issue Dec 2, 2023 · 0 comments

Comments

@demonllord
Copy link

RuntimeError: Failed to import transformers.models.clip.modeling_flax_clip because of the following error (look up to see its traceback):
module 'jax.numpy' has no attribute 'DeviceArray'

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/transformers/utils/import_utils.py", line 1353, in _get_module
    return importlib.import_module("." + module_name, self.__name__)
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/local/lib/python3.10/dist-packages/transformers/models/clip/modeling_flax_clip.py", line 29, in <module>
    from ...modeling_flax_utils import (
  File "/usr/local/lib/python3.10/dist-packages/transformers/modeling_flax_utils.py", line 38, in <module>
    from .modeling_flax_pytorch_utils import load_pytorch_checkpoint_in_flax_state_dict
  File "/usr/local/lib/python3.10/dist-packages/transformers/modeling_flax_pytorch_utils.py", line 36, in <module>
    from safetensors.flax import load_file as safe_load_file
  File "/usr/local/lib/python3.10/dist-packages/safetensors/flax.py", line 10, in <module>
    def save(tensors: Dict[str, jnp.DeviceArray], metadata: Optional[Dict[str, str]] = None) -> bytes:
  File "/usr/local/lib/python3.10/dist-packages/jax/_src/deprecations.py", line 53, in getattr
    raise AttributeError(f"module {module!r} has no attribute {name!r}")
AttributeError: module 'jax.numpy' has no attribute 'DeviceArray'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/content/AnimateDiff/scripts/animate.py", line 9, in <module>
    import diffusers
  File "/usr/local/lib/python3.10/dist-packages/diffusers/__init__.py", line 47, in <module>
    from .pipelines import (
  File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/__init__.py", line 42, in <module>
    from .alt_diffusion import AltDiffusionImg2ImgPipeline, AltDiffusionPipeline
  File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/alt_diffusion/__init__.py", line 33, in <module>
    from .pipeline_alt_diffusion import AltDiffusionPipeline
  File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion.py", line 36, in <module>
    from ..stable_diffusion.safety_checker import StableDiffusionSafetyChecker
  File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/stable_diffusion/__init__.py", line 100, in <module>
    from .pipeline_flax_stable_diffusion import FlaxStableDiffusionPipeline
  File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion.py", line 28, in <module>
    from transformers import CLIPFeatureExtractor, CLIPTokenizer, FlaxCLIPTextModel
  File "<frozen importlib._bootstrap>", line 1075, in _handle_fromlist
  File "/usr/local/lib/python3.10/dist-packages/transformers/utils/import_utils.py", line 1344, in __getattr__
    value = getattr(module, name)
  File "/usr/local/lib/python3.10/dist-packages/transformers/utils/import_utils.py", line 1343, in __getattr__
    module = self._get_module(self._class_to_module[name])
  File "/usr/local/lib/python3.10/dist-packages/transformers/utils/import_utils.py", line 1355, in _get_module
    raise RuntimeError(
RuntimeError: Failed to import transformers.models.clip.modeling_flax_clip because of the following error (look up to see its traceback):
module 'jax.numpy' has no attribute 'DeviceArray'
---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
[<ipython-input-6-a2b3710f257d>](https://localhost:8080/#) in <cell line: 164>()
    163 
    164 if show_results:
--> 165   display_results(How_many_previous_results_to_show)

[<ipython-input-1-963444df9bde>](https://localhost:8080/#) in display_results(count)
    172 
    173 def display_results(count):
--> 174   samples = os.listdir(samples_dir)
    175 
    176   # Sort reverse alphabetical

FileNotFoundError: [Errno 2] No such file or directory: '/content/AnimateDiff/samples'
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant