--- Start MasterLoop Master Loop Start --- Start Processing File --- - Custom Texture Tool PS v42.0.b6.log -- Texture Validation Start -- Validate Extension Failed End Processing File --- Start Processing File --- - Custom Texture Tool PS v42.0.b6.ps1 -- Texture Validation Start -- Validate Extension Failed End Processing File --- Start Processing File --- - file_0391.png -- Texture Validation Start --- Texture Extension Validated (1/3) --- Texture FileName Validated (2/3) --- Texture Header Validated (3/3) -- Texture Validation End - TextureInfo created for file: file_0391.png PowerShell Version: 5.1.18362.145 Python Path : D:\Programs\Python 3\python.exe Python Exists: True ESRGAN Path : D:\Programs\Textures\SuperScalers\ESRGAN\test.py ESRGAN Exists: True Upscale-Hashtable Values: Width : 320 Height : 240 Dimensions : 320x240 Factor : 4 NewWidth : 1280 NewHeight : 960 NewDimensions : 1280x960 HasAlphaPixels : False Alpha : off PNGType : png:format=png24 Seamless : False OutputPath : G:\Emulation HD Textures\Custom Texture Tool PS Test\~CTT_Generated\FilteredTextures(ESRGAN) Input Texture Path: G:\Emulation HD Textures\Custom Texture Tool PS Test\file_0391.png Temporary Upscaled Texture Path: C:\Users\Robert\AppData\Local\Temp\CTT-PS_Temp\TempFiltered\file_0391.png Alpha Image (If Available): Multiplied Image: G:\Emulation HD Textures\Custom Texture Tool PS Test\file_0391.png Image-Info Verification: Width : 320 Height : 240 ESRGAN: Upscaling image... Non-Alpha Method Used: ImageFile : G:\Emulation HD Textures\Custom Texture Tool PS Test\file_0391.png Factor : 4 OutputFile : C:\Users\Robert\AppData\Local\Temp\CTT-PS_Temp\TempFiltered\file_0391.png Working Directory: D:\Programs\Textures\SuperScalers\ESRGAN ESRGAN Parameters: ESRGAN Base : D:\Programs\Textures\SuperScalers\ESRGAN Model Path : models\RRDB_PSNR_x4.pth Input Image : D:\Programs\Textures\SuperScalers\ESRGAN\LR\file_0391.png Input Exists : True Attempt Invoke-Expression version of function... Output Image : D:\Programs\Textures\SuperScalers\ESRGAN\results\file_0391_rlt.png Output Exists: False Invoke-Expression version failed! Deeper scan of results folder... Attempting version with no Invoke-Expression... D:\Programs\Python 3\lib\site-packages\torch\nn\modules\upsampling.py:129: UserWarning: nn.Upsample is deprecated. Use nn.functional.interpolate instead. warnings.warn("nn.{} is deprecated. Use nn.functional.interpolate instead.".format(self.name)) Deeper scan of results folder... Found: file_0391_rlt.png Output Image : D:\Programs\Textures\SuperScalers\ESRGAN\results\file_0391_rlt.png Output Exists: True Final Image : C:\Users\Robert\AppData\Local\Temp\CTT-PS_Temp\TempFiltered\file_0391.png Final Exists : True ---------------------------------------------------------------------------------- Python Script START ---------------------------------------------------------------------------------- 01 : import sys 02 : import os.path 03 : import glob 04 : import cv2 05 : import numpy as np 06 : import torch 07 : import architecture as arch 08 : 09 : model_path = sys.argv[1] # models/RRDB_ESRGAN_x4.pth OR models/RRDB_PSNR_x4.pth 10 : device = torch.device('cuda') 11 : # device = torch.device('cpu') 12 : 13 : test_img_folder = 'LR/*' 14 : 15 : model = arch.RRDB_Net(3, 3, 64, 23, gc=32, upscale=4, norm_type=None, act_type='leakyrelu', \ 16 : mode='CNA', res_scale=1, upsample_mode='upconv') 17 : model.load_state_dict(torch.load(model_path), strict=True) 18 : model.eval() 19 : for k, v in model.named_parameters(): 20 : v.requires_grad = False 21 : model = model.to(device) 22 : 23 : print('Model path {:s}. \nTesting...'.format(model_path)) 24 : 25 : idx = 0 26 : for path in glob.glob(test_img_folder): 27 : idx += 1 28 : base = os.path.splitext(os.path.basename(path))[0] 29 : print(idx, base) 30 : # read image 31 : img = cv2.imread(path, cv2.IMREAD_COLOR) 32 : img = img * 1.0 / 255 33 : img = torch.from_numpy(np.transpose(img[:, :, [2, 1, 0]], (2, 0, 1))).float() 34 : img_LR = img.unsqueeze(0) 35 : img_LR = img_LR.to(device) 36 : 37 : output = model(img_LR).data.squeeze().float().cpu().clamp_(0, 1).numpy() 38 : output = np.transpose(output[[2, 1, 0], :, :], (1, 2, 0)) 39 : output = (output * 255.0).round() 40 : cv2.imwrite('results/{:s}_rlt.png'.format(base), output) ---------------------------------------------------------------------------------- Python Script END ---------------------------------------------------------------------------------- Output Texture : C:\Users\Robert\AppData\Local\Temp\CTT-PS_Temp\TempFiltered\file_0391.png Output Exists So Far : True Output Still Exists : True And Output STILL Exists : True Final Upscaled Texture Path: G:\Emulation HD Textures\Custom Texture Tool PS Test\~CTT_Generated\FilteredTextures(ESRGAN)\file_0391.png Final Upscaled Texture Path Exists: True End Processing File --- --- End MasterLoop