guoyww / AnimateDiff

Official implementation of AnimateDiff.
https://animatediff.github.io
Apache License 2.0
10.65k stars 874 forks source link

how to use lora generate gif #60

Open magicwang1111 opened 1 year ago

magicwang1111 commented 1 year ago

lyriel_v16: base: "models/DreamBooth_LoRA/lyriel_v16.safetensors" path: "models/DreamBooth_LoRA/DANWGFWL.safetensors" motion_module:

magicwang1111 commented 1 year ago

Traceback (most recent call last): File "C:\Users\admin\anaconda3\envs\animatediff\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\admin\anaconda3\envs\animatediff\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "D:\AnimateDiff\scripts\animate.py", line 159, in main(args) File "D:\AnimateDiff\scripts\animate.py", line 103, in main pipeline = convert_lora(pipeline, state_dict, alpha=model_config.lora_alpha) File "C:\Users\admin\anaconda3\envs\animatediff\lib\site-packages\omegaconf\dictconfig.py", line 355, in getattr self._format_and_raise( File "C:\Users\admin\anaconda3\envs\animatediff\lib\site-packages\omegaconf\base.py", line 231, in _format_and_raise format_and_raise( File "C:\Users\admin\anaconda3\envs\animatediff\lib\site-packages\omegaconf_utils.py", line 899, in format_and_raise _raise(ex, cause) File "C:\Users\admin\anaconda3\envs\animatediff\lib\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 "C:\Users\admin\anaconda3\envs\animatediff\lib\site-packages\omegaconf\dictconfig.py", line 351, in getattr return self._get_impl( File "C:\Users\admin\anaconda3\envs\animatediff\lib\site-packages\omegaconf\dictconfig.py", line 442, in _get_impl node = self._get_child( File "C:\Users\admin\anaconda3\envs\animatediff\lib\site-packages\omegaconf\basecontainer.py", line 73, in _get_child child = self._get_node( File "C:\Users\admin\anaconda3\envs\animatediff\lib\site-packages\omegaconf\dictconfig.py", line 480, in _get_node raise ConfigKeyError(f"Missing key {key!s}") omegaconf.errors.ConfigAttributeError: Missing key lora_alpha full_key: lyriel_v16.lora_alpha object_type=dict

guoyww commented 1 year ago

Hi, it seems you should add the key "lora_alpha" in your config file, e.g.,

... path: "models/DreamBooth_LoRA/DANWGFWL.safetensors" lora_alpha: 0.8 ...