public Waifu2xVulkan(UpscaleSettings upscaleSettings, Waifu2xSettings waifu2XSettings, IFileProxy fileProxy, ILogger <Waifu2xVulkan> logger) { this._waifu2XSettings = waifu2XSettings; this._fileProxy = fileProxy; this._logger = logger; if (string.IsNullOrEmpty(waifu2XSettings.OutputPath)) { throw new ArgumentNullException(nameof(waifu2XSettings.OutputPath)); } this._outputPath = Path.Combine(upscaleSettings.TempPath, waifu2XSettings.OutputPath); }
private void SetArgumentsString(ProcessStartInfo processStartInfo, Waifu2xSettings waifu2XSettings) { if (!string.IsNullOrEmpty(waifu2XSettings.ModelPath)) { processStartInfo.Arguments += $"-m {waifu2XSettings.ModelPath} "; } if (waifu2XSettings.Scale > 0) { processStartInfo.Arguments += $"-s {waifu2XSettings.Scale} "; } if (waifu2XSettings.NoiseLevel > 0) { processStartInfo.Arguments += $"-n {waifu2XSettings.NoiseLevel} "; } }