diff --git a/Code/Main/MainForm.Designer.cs b/Code/Main/MainForm.Designer.cs index 1114391..b8c81f3 100644 --- a/Code/Main/MainForm.Designer.cs +++ b/Code/Main/MainForm.Designer.cs @@ -1000,7 +1000,7 @@ private void InitializeComponent() this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(364, 34); this.label5.TabIndex = 1; - this.label5.Text = "Cupscale [Build 33 - 12/14/20]"; + this.label5.Text = "Cupscale [Build 33 - 12/16/20]"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // panel7 diff --git a/Code/Main/MainForm.cs b/Code/Main/MainForm.cs index 74f8632..02a44da 100644 --- a/Code/Main/MainForm.cs +++ b/Code/Main/MainForm.cs @@ -630,6 +630,8 @@ public void LoadEsrganOptions () private void tilesize_SelectedIndexChanged(object sender, EventArgs e) { SaveEsrganOptions(); + if(initialized && Config.GetInt("esrganVer") == 0) + Program.ShowMessage("Tiling is now automatic when using Joey's ESRGAN. The tile size option will soon be removed."); } private void alpha_CheckedChanged(object sender, EventArgs e) diff --git a/Code/OS/ESRGAN.cs b/Code/OS/ESRGAN.cs index a8cea84..f3435ab 100644 --- a/Code/OS/ESRGAN.cs +++ b/Code/OS/ESRGAN.cs @@ -35,7 +35,7 @@ public static async Task DoUpscale(string inpath, string outpath, ModelData mdl, } else { - Program.mainForm.SetProgress(4f, "Starting ESRGAN..."); + Program.mainForm.SetProgress(2f, "Starting ESRGAN..."); File.Delete(Paths.progressLogfile); string modelArg = GetModelArg(mdl, useJoey); if (useJoey) @@ -201,19 +201,19 @@ public static async Task RunJoey(string inpath, string outpath, string modelArg, string deviceStr = ""; if (Config.Get("cudaFallback").GetInt() == 1 || Config.Get("cudaFallback").GetInt() == 2) deviceStr = "--cpu"; - string seamStr = ""; + string seamStr = "--seamless "; switch (Config.Get("seamlessMode").GetInt()) { - case 1: seamStr = "--seamless"; break; - case 2: seamStr = "--mirror"; break; - case 3: seamStr = "--replicate"; break; - case 4: seamStr = "--alpha_padding"; break; + case 1: seamStr += "tile"; break; + case 2: seamStr += "mirror"; break; + case 3: seamStr += "replicate"; break; + case 4: seamStr += "alpha_pad"; break; } string opt = stayOpen ? "/K" : "/C"; string cmd = $"{opt} cd /D {Paths.esrganPath.Wrap()} & "; - cmd += $"{EmbeddedPython.GetPyCmd()} upscale.py --input {inpath} --output {outpath} {deviceStr} {seamStr} --tile_size {tilesize} {alphaStr} {modelArg}".TrimWhitespaces(); + cmd += $"{EmbeddedPython.GetPyCmd()} upscale.py --input {inpath} --output {outpath} {deviceStr} {seamStr} {alphaStr} {modelArg}".TrimWhitespaces(); Logger.Log("[CMD] " + cmd); Process esrganProcess = OSUtils.NewProcess(!showWindow); @@ -290,6 +290,11 @@ private static async Task UpdateProgressFromFile() if (outStr == lastProgressString) return; lastProgressString = outStr; + if(outStr.Contains("Applying model") || outStr.Contains("Upscaling...")) + { + Program.mainForm.SetProgress(5f, "Upscaling..."); + return; + } string text = outStr.Replace("Tile ", "").Trim(); try { diff --git a/Code/Resources/shipped-files-version.txt b/Code/Resources/shipped-files-version.txt index 980abc0..1bcc324 100644 --- a/Code/Resources/shipped-files-version.txt +++ b/Code/Resources/shipped-files-version.txt @@ -1,3 +1,4 @@ +14 # joey's esrgan update, auto-tiling 13 # new h265 supporting ffmpeg exe 12 # joey's esrgan update, fix chaining 11 # added joey's esrgan to fix seams with esrl code diff --git a/Installer Files/esrgan.7z b/Installer Files/esrgan.7z index 9d33cb0..625e674 100644 Binary files a/Installer Files/esrgan.7z and b/Installer Files/esrgan.7z differ diff --git a/Installer Files/shipped-files-version.txt b/Installer Files/shipped-files-version.txt index 980abc0..1bcc324 100644 --- a/Installer Files/shipped-files-version.txt +++ b/Installer Files/shipped-files-version.txt @@ -1,3 +1,4 @@ +14 # joey's esrgan update, auto-tiling 13 # new h265 supporting ffmpeg exe 12 # joey's esrgan update, fix chaining 11 # added joey's esrgan to fix seams with esrl code