hotshotco / Hotshot-XL

✨ Hotshot-XL: State-of-the-art AI text-to-GIF model trained to work alongside Stable Diffusion XL
https://hotshot.co
Apache License 2.0
983 stars 77 forks source link

Unexpected keyword argument 'enable_temporal_attentions' #1

Closed alfredplpl closed 9 months ago

alfredplpl commented 9 months ago

I would like to an animation by my model, so I run the code:

python inference.py   --prompt="anime style, anime artworks, a girl is smiling"   --output="output.gif" --pretrained_path='/home/username/github/emi'

Then, I got the error:

Traceback (most recent call last):
  File "inference.py", line 191, in <module>
    main()
  File "inference.py", line 171, in main
    images = pipe(args.prompt,
  File "/home/username/github/Hotshot-XL/venv/lib/python3.8/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/home/username/github/Hotshot-XL/hotshot_xl/pipelines/hotshot_xl_pipeline.py", line 825, in __call__
    noise_pred = self.unet(
  File "/home/username/github/Hotshot-XL/venv/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
TypeError: forward() got an unexpected keyword argument 'enable_temporal_attentions'

How can I fix it?

alfredplpl commented 9 months ago

FYI: I can generate the animation by your model. output

aakashs commented 9 months ago

awesome @alfredplpl - could you please post how you resolved your issue for others' future reference?

alfredplpl commented 9 months ago

@aakashs Sorry, this is made by the default model. So, I wanna make know how to make the model.

alfredplpl commented 9 months ago

I misunderstand this repository. The author wrote it. So, I ran the command:

python inference.py   --prompt="anime style, anime artworks, a girl is smiling"   --output="output.gif" --spatial_unet_base='/home/username/github/emi_anime/unet'

Then, I got my animation by my model. output

Thanks again. The issue will be closed.