fix image upscaling

This commit is contained in:
2023-06-04 10:05:17 +02:00
parent bf2931085f
commit e3d1ff1228
4 changed files with 60 additions and 33 deletions

View File

@@ -11,11 +11,12 @@ class Scaler:
self.tmppath = ""
self.videometa = {}
def singleScaler ( self, input_path, output_path, scalefactor, threads, mode ):
def singleScaler ( self, input_path, output_path, scalefactor, sharpening, threads, mode, tmppath ):
modes = { 'av3':'realesr-animevideov3', 'x4plus': 'realesrgan-x4plus-anime' }
if self.os_type == 'linux':
self.command = f'wine ./bin/lib/FidelityFX_CLI.exe -Scale {scalefactor} {scalefactor} {input_path} {output_path} -n { mode }'
self.command = f'wine ./bin/lib/realesrgan-ncnn-vulkan.exe -i {input_path} -o {output_path} -s {scalefactor} -j {threads}:{threads}:{threads} -n { modes[ mode ] }'
elif self.os_type == 'win32':
self.command = f'realesrgan-ncnn-vulkan -i {input_path} -o {output_path} -s {scalefactor} -j {threads}:{threads}:{threads} -n { mode }'
self.command = f'realesrgan-ncnn-vulkan -i {input_path} -o {output_path} -s {scalefactor} -j {threads}:{threads}:{threads} -n { modes[ mode ] }'
else:
print( 'OS CURRENTLY UNSUPPORTED!' )
return False