diff --git a/src/upscaler.py b/src/upscaler.py index c5a4ee9..af5157b 100755 --- a/src/upscaler.py +++ b/src/upscaler.py @@ -103,7 +103,7 @@ class Upscaler: if self.video2x_cache_directory.exists() and not self.video2x_cache_directory.is_dir(): Avalon.error(_('Specified or default cache directory is a file/link')) raise FileExistsError('Specified or default cache directory is a file/link') - + # if cache directory doesn't exist, try creating it if not self.video2x_cache_directory.exists(): try: @@ -156,7 +156,7 @@ class Upscaler: else: Avalon.error(_('Input path is neither a file nor a directory')) raise FileNotFoundError(f'{self.input_path} is neither file nor directory') - + # check Fmpeg settings ffmpeg_path = pathlib.Path(self.ffmpeg_settings['ffmpeg_path']) if not ((pathlib.Path(ffmpeg_path / 'ffmpeg.exe').is_file() and @@ -305,7 +305,7 @@ class Upscaler: self.progress_monitor.stop() Avalon.debug_info(_('Killing upscaled image cleaner')) - self.image_cleaner.stop() + self.image_cleaner.stop() raise e # if the driver is waifu2x-converter-cpp @@ -337,7 +337,7 @@ class Upscaler: try: # while process pool not empty while self.process_pool: - + # if stop signal received, terminate all processes if self.stop_signal is True: raise SystemExit @@ -376,7 +376,7 @@ class Upscaler: This function controls the flow of video conversion and handles all necessary functions. """ - + # external stop signal when called in a thread self.stop_signal = False diff --git a/src/video2x.yaml b/src/video2x.yaml index 7d56509..7836b6f 100644 --- a/src/video2x.yaml +++ b/src/video2x.yaml @@ -37,7 +37,7 @@ waifu2x_converter_cpp: force-OpenCL: false # force to use OpenCL on Intel Platform processor: -1 # set target processor jobs: 0 # number of threads launching at the same time - model-dir: null # path to custom model directory (don't append last / ) default: models_rgb + model-dir: null # path to custom model directory (don't append last / ) default: models_rgb #scale-ratio: 2.0 # custom scale ratio noise-level: 1 # <0|1|2|3> noise reduction level mode: noise-scale # image processing mode diff --git a/src/wrappers/anime4kcpp.py b/src/wrappers/anime4kcpp.py index e71a593..64f9fe2 100644 --- a/src/wrappers/anime4kcpp.py +++ b/src/wrappers/anime4kcpp.py @@ -73,7 +73,7 @@ class WrapperMain: self.driver_settings['output'] = output_file self.driver_settings['zoomFactor'] = zoom_factor self.driver_settings['threads'] = threads - + # Anime4KCPP will look for Anime4KCPPKernel.cl under the current working directory # change the CWD to its containing directory so it will find it if platform.system() == 'Windows':