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

Error #359

Open
Sadrahel opened this issue Jun 20, 2024 · 0 comments
Open

Error #359

Sadrahel opened this issue Jun 20, 2024 · 0 comments

Comments

@Sadrahel
Copy link

Sadrahel commented Jun 20, 2024

I'm triyng to use Animate Diff without any webui or anything else...
The test with ToonYou was ok, but then...

Here is my test.yaml

  • inference_config: "configs/inference/inference-v1.yaml"
    motion_module:
    path:
    - "models/Motion_Module/mm_sd_v14.ckpt"
    - "models/Motion_Module/mm_sd_v15.ckpt"
    - "models/Motion_Module/mm_sd_v15_v2.ckpt"
    motion_module_lora_configs:

    • path: ""
      alpha: 1.0
      dreambooth_path: ""
      lora_model_path: ""
      steps: 25
      guidance_scale: 7.5
      prompt:
    • "a car"
      n_prompt:
    • ""

    Here is the error...

(animatediff) guillaume@debian:~/AnimateDiff$ python -m scripts.animate --config configs/prompts/test.yaml
loaded 3D unet's pretrained weights from models/StableDiffusion/stable-diffusion-v1-5/unet ...

missing keys: 560;

unexpected keys: 0;

Motion Module Parameters: 417.1376 M

load motion module from {'path': ['models/Motion_Module/mm_sd_v14.ckpt', 'models/Motion_Module/mm_sd_v15.ckpt', 'models/Motion_Module/mm_sd_v15_v2.ckpt']}
Traceback (most recent call last):
File "/home/guillaume/anaconda3/envs/animatediff/lib/python3.10/site-packages/torch/serialization.py", line 308, in _check_seekable
f.seek(f.tell())
File "/home/guillaume/anaconda3/envs/animatediff/lib/python3.10/site-packages/omegaconf/dictconfig.py", line 355, in getattr
self._format_and_raise(
File "/home/guillaume/anaconda3/envs/animatediff/lib/python3.10/site-packages/omegaconf/base.py", line 231, in _format_and_raise
format_and_raise(
File "/home/guillaume/anaconda3/envs/animatediff/lib/python3.10/site-packages/omegaconf/_utils.py", line 899, in format_and_raise
_raise(ex, cause)
File "/home/guillaume/anaconda3/envs/animatediff/lib/python3.10/site-packages/omegaconf/_utils.py", line 797, in _raise
raise ex.with_traceback(sys.exc_info()[2]) # set env var OC_CAUSE=1 for full trace
File "/home/guillaume/anaconda3/envs/animatediff/lib/python3.10/site-packages/omegaconf/dictconfig.py", line 351, in getattr
return self._get_impl(
File "/home/guillaume/anaconda3/envs/animatediff/lib/python3.10/site-packages/omegaconf/dictconfig.py", line 442, in _get_impl
node = self._get_child(
File "/home/guillaume/anaconda3/envs/animatediff/lib/python3.10/site-packages/omegaconf/basecontainer.py", line 73, in _get_child
child = self._get_node(
File "/home/guillaume/anaconda3/envs/animatediff/lib/python3.10/site-packages/omegaconf/dictconfig.py", line 480, in _get_node
raise ConfigKeyError(f"Missing key {key!s}")
omegaconf.errors.ConfigAttributeError: Missing key seek
full_key: [0].motion_module.seek
object_type=dict

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/guillaume/anaconda3/envs/animatediff/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/guillaume/anaconda3/envs/animatediff/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/guillaume/AnimateDiff/scripts/animate.py", line 195, in
main(args)
File "/home/guillaume/anaconda3/envs/animatediff/lib/python3.10/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/home/guillaume/AnimateDiff/scripts/animate.py", line 125, in main
pipeline = load_weights(
File "/home/guillaume/AnimateDiff/animatediff/utils/util.py", line 111, in load_weights
motion_module_state_dict = torch.load(motion_module_path, map_location="cpu")
File "/home/guillaume/anaconda3/envs/animatediff/lib/python3.10/site-packages/torch/serialization.py", line 699, in load
with _open_file_like(f, 'rb') as opened_file:
File "/home/guillaume/anaconda3/envs/animatediff/lib/python3.10/site-packages/torch/serialization.py", line 235, in _open_file_like
return _open_buffer_reader(name_or_buffer)
File "/home/guillaume/anaconda3/envs/animatediff/lib/python3.10/site-packages/torch/serialization.py", line 220, in init
_check_seekable(buffer)
File "/home/guillaume/anaconda3/envs/animatediff/lib/python3.10/site-packages/torch/serialization.py", line 311, in _check_seekable
raise_err_msg(["seek", "tell"], e)
File "/home/guillaume/anaconda3/envs/animatediff/lib/python3.10/site-packages/torch/serialization.py", line 304, in raise_err_msg
raise type(e)(msg)
omegaconf.errors.ConfigAttributeError: Missing key seek
full_key: [0].motion_module.seek
object_type=dict. You can only torch.load from a file that is seekable. Please pre-load the data into a buffer like io.BytesIO and try to load from it instead

If anybody can tell me what I'm doing wrong... Thank you very much in advance!

@Sadrahel Sadrahel changed the title First installation failed First installation failed // Unexpected key(s) in state_dict: "text_model.embeddings.position_ids". Jun 21, 2024
@Sadrahel Sadrahel changed the title First installation failed // Unexpected key(s) in state_dict: "text_model.embeddings.position_ids". Error Jun 22, 2024
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

1 participant