AliaksandrSiarohin / first-order-model

This repository contains the source code for the paper First Order Motion Model for Image Animation
https://aliaksandrsiarohin.github.io/first-order-model-website/
MIT License
14.57k stars 3.22k forks source link

Gives me the source video instead of the result in the new colab demo #490

Open Cyanwise opened 2 years ago

Cyanwise commented 2 years ago

Whenever I try to make a deepfake, it gives me the video I use to animate the face instead of the result it supposed to give me. It never happened to me in the old demo.

cheliosooo commented 2 years ago

I was able to find a hacky fix to get it working. CTRL+F and look for the following code in the google collab:

if selected_video.startswith('user/') or selected_video == 'demo/videos/0.mp4':
   imageio.mimsave('temp.mp4', [img_as_ubyte(frame) for frame in predictions], fps=fps)
   FFmpeg(inputs={'temp.mp4': None, selected_video: None}, outputs={'output.mp4': '-c copy -y'}).run()
else:
    imageio.mimsave('output.mp4', [img_as_ubyte(frame) for frame in predictions], fps=fps)

And change it to just this:

imageio.mimsave('output.mp4', [img_as_ubyte(frame) for frame in predictions], fps=fps)
graphemecluster commented 2 years ago

Hello, I am the author of demo.ipynb. The line with FFmpeg is supposed to copy the audio from the source video to the output. Did it do anything unexpected? @AbstractVoid