dmarx / video-killed-the-radio-star

Notebook and tools for end-to-end automation of music video production with generative AI
https://colab.research.google.com/github/dmarx/video-killed-the-radio-star/blob/main/Video_Killed_The_Radio_Star_Defusion.ipynb#scrollTo=oPbeyWtesAoh
MIT License
198 stars 35 forks source link

Generate Animation Frames - TypeError: __call__() got an unexpected keyword argument 'init_image' #111

Closed H2whoaMusic closed 1 year ago

H2whoaMusic commented 1 year ago

During the "Generate Animation Frames" step, I keep not being able to proceed. Here is the output that it is returning:

Fetching variations
1
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
[<ipython-input-12-6970025e684d>](https://localhost:8080/#) in <module>
    153         tot_variations -= curr_variation_count  # only generate variations we still need
    154         for _ in range(tot_variations):
--> 155             img = get_variations_w_init(prompt, init_image, start_schedule=(1-image_consistency))[0]
    156             save_frame(
    157                 img,

3 frames
[<ipython-input-11-8eb69b1873c3>](https://localhost:8080/#) in get_variations_w_init(prompt, init_image, **kargs)
     98 
     99 def get_variations_w_init(prompt, init_image, **kargs):
--> 100     return list(get_image_for_prompt(prompt=prompt, init_image=init_image, **kargs))
    101 
    102 def get_close_variations_from_prompt(prompt, n_variations=2, image_consistency=.7):

[<ipython-input-6-8eb69b1873c3>](https://localhost:8080/#) in get_image_for_prompt(*args, **kargs)
     93     # I give up.
     94     def get_image_for_prompt(*args, **kargs):
---> 95         result = hf_helper.get_image_for_prompt(*args, **kargs)
     96         return result.images
     97 

[/usr/local/lib/python3.8/dist-packages/vktrs/hf.py](https://localhost:8080/#) in get_image_for_prompt(self, prompt, **kwargs)
     84             kwargs['strength'] = kwargs.pop('start_schedule')
     85         with autocast(self.device):
---> 86             return f(prompt, **kwargs)

[/usr/local/lib/python3.8/dist-packages/torch/autograd/grad_mode.py](https://localhost:8080/#) in decorate_context(*args, **kwargs)
     25         def decorate_context(*args, **kwargs):
     26             with self.clone():
---> 27                 return func(*args, **kwargs)
     28         return cast(F, decorate_context)
     29 

TypeError: __call__() got an unexpected keyword argument 'init_image'

Any help appreciated!

ianhirsch commented 1 year ago

Also getting this, seems to be a PR here

dmarx commented 1 year ago

this should be fixed now, lemme know if you're still having issues