cswry / OSEDiff

138 stars 7 forks source link

OSEDiff video upscaling script #28

Open zelenooki87 opened 1 month ago

zelenooki87 commented 1 month ago

Hi. I made a batch video upscaling script using OSEDiff. The script assumes the models are in the default location (you can specify them at runtime or edit the path as needed). The script loads video files from the input folder, extracts frames, upscales them using OSEDiff, then merges the frames and the original audio file into an output video file in the output directory and then deletes the temporary files. Keep in mind that the ffv1 codec is used with maximum quality so the output file can be larger. You can change the codec yourself if you wish. To run the script you need ffmpeg and the added path variable in the variables so that ffmpeg can be executed directly.

The results are not perfect because the model is not intended for video files, but it can help others test the script. Cheers

https://pastebin.com/XdNZAKr3

zelenooki87 commented 1 month ago

@cswry Can you help me? How can I use this script to upscale lower resolution inputs without tiling? If I change the tile values to be larger than the default, the code executes and says it's not using tiling, but the output quality is worse than when it uses tiling with the automatic, default values. How can I "properly" force the code to not use the tiling function and achieve the expected results? Thanks.

AIisCool commented 1 month ago

@zelenooki87 I'm curious how your video output looks. I've tried doing the same with just extracted frames, and while it can maintain some consistency, there's too much of a temporal difference in notable areas like backgrounds despite being not in motion.