ArcticHare105 / S3Diff

Official implementation of S3Diff
Apache License 2.0
93 stars 6 forks source link

batch Video Upscaling script #11

Open zelenooki87 opened 1 month ago

zelenooki87 commented 1 month ago

I've written a script that performs video upscaling using S3Diff in batch mode. The file inference_s3diff_video.py should be located in the src subdirectory of the S3Diff folder. The default location for input video files is the "video" folder. Place the video upscaling script, video_upscale.py, in the root directory of S3Diff. The models are assumed to be at these paths: 'assets/mm-realsr/de_net.pth', 'models/s3diff.pkl', and 'models/sd-turbo'. You can modify the paths to the models within the upscaling script itself, as well as the codec if you prefer a different one. :)

Simply run the script within your conda environment with the command: python video_upscale.py

The upscaled videos will be placed in the "video" folder alongside the originals, with a suffix appended. :)

You'll need to download and install FFmpeg. On Windows, you'll need to add it to your PATH environment variable. I haven't tested the script on Ubuntu, but it should work. :) v2 S3Diff_video_upscaling_batch script.zip

ArcticHare105 commented 1 month ago

@zelenooki87 Thank you so much for your valuable contribution!

zelenooki87 commented 1 month ago

I've added the edited script and the necessary files to the first message. :)