(03-13-2019, 10:09 PM)Bighead Wrote: I have a test version ready for ESRGAN/SFTGAN.
http://www.mediafire.com/file/dkec4ti1aw...0.0.b1.zip
As far as I can tell, ESRGAN works fine, but SFTGAN is failing on a lot of images and I can't exactly figure out why. I'll go more into that later, but first I want to explain the set up process.
IF YOU HAVE NOTHING REQUIRED INSTALLED
This is how to set everything up the easy way: Go to Options >> Operations Tab >> Automatic Setup button on the ESRGAN/SFTGAN section. There are 6 steps, just make your way through them and follow them closely.
IF YOU HAVE EVERYTHING REQUIRED INSTALLED
If you already have Python, Cuda, and the filters already up and running, you can simply link them to the script on the "Tool Paths" menu. If Python v3.6 is already installed, it should pull the install path from the registry.
AFTER EVERYTHING IS SET UP
If the models don't show up after adding them, and you are sure all the paths are correct, close the options menu and reopen them and they should appear in the lists. After everything has been set up, ESRGAN and SFTGAN should appear in the upscaling filters list.
CURRENT ISSUES
ESRGAN works fine, but I am having issues with SFTGAN. I learned most of everything from this blog post here. It was mentioned that SFTGAN requires upscaling the image 4x before running it, but when I attempt this, I get an error in the segmentation test that makes the whole thing break down.
The segmentation test is required. SFTGAN requires running 2 scripts: the segmentation test, and then the SFTGAN test. The segmentation test breaks the image down into multiple images, then the SFTGAN test does the magic. Unfortunately, something is failing on the segmentation test when I upscale images, and often when I don't. I won't have time to try to figure this out for a few days, so hopefully someone who has experience with SFTGAN can point me in the right direction.
The code that prepares SFTGAN can be found on line 2100. On lines 2113 and 2114 is where the upscaling takes place, simply changing the upscale factor for width and height to 1x (for example, $RawImageData.Width * 1) makes many images work, but they don't get upscaled so it defeats the purpose...
And the actual "job" to do the upscaling can be found on line 2052, but I don't think it is at fault here as it is just calling the program in a separate PS instance.Spoiler:
SFTGAN is currently coded to write to the console with Out-Host, so if the PowerShell console is enabled all the errors will be visible.Spoiler:
Another issue is that the progress bars don't fill all the way up during the automatic installation. I have no idea why, but it does not affect the installation in any way.
That's great! Now I will try.