dunnousername / yanderifier

First-Order-Wrapper (formerly known as Yanderify) is a front-end tool for first-order-motion. It aims to make using first-order-motion face animation accessible to everyone, for education and entertainment.
1.77k stars 291 forks source link

Is there any way to change resolution or bitrate? #84

Open thegrandmasterflash opened 2 years ago

thegrandmasterflash commented 2 years ago

Is there any way to change resolution or bitrate? The output videos are square and extremely low qualty. Is there any way to adjust that in some hidden settings file I don't know about?

Animan8000 commented 2 years ago

Yes. So basically this line causes the video to be in a set (and rather low) constant bitrate instead of lossless. Which makes it even worse, is the fact that all videos are always 256x256 (1:1 format) initially and if your image has a higher resolution, then it will be upscaled, giving it a blurry effect (not always necessarily bad, especially hair doesn't look too pixelated in some cases (making it look more real)) but also requiring a higher bitrate, where this set constant bitrate kills the quality even further. I have a fork which is slightly outdated but generates outputs in lossless quality, in terms of bitrate.

Also worth noting that the v5 alpha generates lossless outputs as well as no upscaling IIRC, in case you don't want that in your deepfakes.

Other than that, for real higher resolution I'm pretty sure it requires a different dataset and some internal code changes (pretty sure without code changes it would just crash or cause other accuracy issues).

If you intend uploading a deepfake on YouTube, then I'd recommend at least 1080x1080 resolution because YouTube's video processing on low resolution videos is absolutely terrible and kills the quality even further.