mirror of
https://github.com/k4yt3x/video2x.git
synced 2025-03-03 21:12:13 +00:00
moved constants into one single place
This commit is contained in:
parent
d9610abae0
commit
6c5b7ea17f
@ -38,6 +38,8 @@ import traceback
|
|||||||
from avalon_framework import Avalon
|
from avalon_framework import Avalon
|
||||||
from tqdm import tqdm
|
from tqdm import tqdm
|
||||||
|
|
||||||
|
AVAILABLE_DRIVERS = ['waifu2x_caffe', 'waifu2x_converter', 'waifu2x_ncnn_vulkan', 'anime4k']
|
||||||
|
|
||||||
|
|
||||||
class Upscaler:
|
class Upscaler:
|
||||||
""" An instance of this class is a upscaler that will
|
""" An instance of this class is a upscaler that will
|
||||||
@ -157,7 +159,7 @@ class Upscaler:
|
|||||||
self.upscaler_exceptions = []
|
self.upscaler_exceptions = []
|
||||||
|
|
||||||
# initialize waifu2x driver
|
# initialize waifu2x driver
|
||||||
drivers = ['waifu2x_caffe', 'waifu2x_converter', 'waifu2x_ncnn_vulkan', 'anime4k']
|
drivers = AVAILABLE_DRIVERS
|
||||||
if self.waifu2x_driver not in drivers:
|
if self.waifu2x_driver not in drivers:
|
||||||
raise UnrecognizedDriverError(f'Unrecognized waifu2x driver: {self.waifu2x_driver}')
|
raise UnrecognizedDriverError(f'Unrecognized waifu2x driver: {self.waifu2x_driver}')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user