updates processing unit selection option

This commit is contained in:
K4YT3X
2018-02-24 16:55:26 -05:00
parent 57733d602b
commit 15780d5355
2 changed files with 25 additions and 3 deletions

View File

@@ -17,8 +17,9 @@ import os
class WAIFU2X:
def __init__(self, waifu2x_path):
def __init__(self, waifu2x_path, method):
self.waifu2x_path = waifu2x_path
self.method = method
def upscale(self, folderin, folderout, width, height):
os.system("{} -p cpu -I png -i {} -e png -o {} -w {} -h {}".format(self.waifu2x_path, folderin, folderout, width, height))
os.system("{} -p {} -I png -i {} -e png -o {} -w {} -h {}".format(self.waifu2x_path, self.method, folderin, folderout, width, height))