From 4973ae5b8d665ed7a5240c1d7d881035538196c2 Mon Sep 17 00:00:00 2001 From: k4yt3x Date: Sun, 31 Mar 2019 02:17:10 -0400 Subject: [PATCH] made video2x compatible with pyinstaller --- bin/video2x.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/video2x.py b/bin/video2x.py index e902ed1..c89b499 100644 --- a/bin/video2x.py +++ b/bin/video2x.py @@ -46,6 +46,7 @@ import json import os import psutil import shutil +import sys import tempfile import time import traceback @@ -78,7 +79,7 @@ def process_arguments(): upscaler_options.add_argument('-d', '--driver', help='Waifu2x driver', action='store', default='waifu2x_caffe', choices=['waifu2x_caffe', 'waifu2x_converter']) upscaler_options.add_argument('-y', '--model_dir', help='Folder containing model JSON files', action='store') upscaler_options.add_argument('-t', '--threads', help='Number of threads to use for upscaling', action='store', type=int, default=5) - upscaler_options.add_argument('-c', '--config', help='Video2X config file location', action='store', default='{}\\video2x.json'.format(os.path.dirname(os.path.abspath(__file__)))) + upscaler_options.add_argument('-c', '--config', help='Video2X config file location', action='store', default='{}\\video2x.json'.format(os.path.dirname(os.path.abspath(sys.argv[0])))) upscaler_options.add_argument('-b', '--batch', help='Enable batch mode (select all default values to questions)', action='store_true') # scaling options