I have begun the endeavor of upscaling my BJ screenies FOR SCIENCE... they're from my 2160p mkv's anyways but they're still a bit grainy for my preferences so
Kim2091 made these templates, I am just explaining their use and showing examples. The example chains are pretty simple, but I understand how they can seem overwhelming which is why I have made this. You do require some basic knowledge on chaiNNer and upscaling to make use of these since I will only be going over the relevant nodes.
Pre-made chains/templates for chaiNNer. Pytorch, NCNN, and ONNX included. - Kim2091/chaiNNer-Templates
All credit goes to Kim2091
SIMPLE IMAGE UPSCALE
This should be familiar to you already. This is the basic upscale chain consisting of Load Image/Load Model/Upscale Image/Save Image nodes. These are the only nodes you actually need to run an upscale. View image and View Image External are nodes that let you preview your upscale before/after saving it. You can use the switch on the bottom left of a box to make it inactive during an upscale, allowing you to leave it connected.
SIMPLE FACE UPSCALE
Original (Old picture of H.R. Giger)
Normal upscale
Upscale with added Upscale Face node and GFPGAN (lowered custom scale on upscale face node for size req)
The Upscale Face node is kind of a special node, it will only connect to models that are specifically for face restoration (FaceSR) I donāt believe you will find them in the normal database here is the link for GFPGAN which I am using here in the Load Model node connected to the Upscale Face node (the other model can be any model just the one connected directly has to be FaceSR).
I can't explain exactly how it works, I do know that GANs self-discriminate to produce much more accurate images than normal (in my experience using ESRGAN models which are also used in most of these examples) Here's a Google Doc that can better explain. The difference with a normal GAN model and GFPGAN, or similar FSR models, is that GFPGAN is specifically trained for head/face upscaling. Since it only affects the face, you still need a normal upscale model for the rest of the image. Here are the other two FSR models I know of RestoreFormer / CodeFormer.
If this interests you, search for more broad photography restoration, itās a very technical/specific photo editing skillset and involves work beyond just this. I recommend starting with Rememorie they do some really awesome work, they also do make use of GFPGAN on occasion so I would look through their resources or reach out to them, they have a Reddit account and a personal website I know of in addition to YouTube.
SIMPLE SPLIT TRANSPARENCY
Original image (regular non-upscaled frame half ereased in PS with outer glow layer style)
Upscaled with normal chain
Upscaled with Split Transparency (ignore the banding, Iām not using a very good example for this)
This chain is used for upscaling images with transparency. It separates the alpha from the rest of the image with the Split Transparency node and upscales each independently before merging them with the Merge Transparency node. You would mostly be using this for textures, but it has a bunch of other uses as well.
Normal upscales only read rgb not rgba (which is why the middle picture is grey on the edge itās not set up to read the alpha channel), you used to have to separate the image manually in something like GIMP and upscale each separately before going back to remerge, now we have chaiNNer.
SIMPLE VIDEO ITERATOR
Original GIF
Upscaled GIF
Upscaled to MP4 format
(note: custom scale was lowered to fit 10mb upload requirement on GIF, trust me it looked the same either way it does look a bit better if you expand it) Something that you wonāt see very commonly used, but itās there, is Video Iteration which is just upscaling videos (mkv, mov, gif, mp4, avi, webm). You will not get the same results as you will from upscaling frames. I donāt upscale videos using this method so thereās better people out there to explain it and better upscaling programs to do it in. This is just what this chain is and what itās for.
SIMPLE IMAGE ITERATOR
This chain is a batch processing chain. I have some examples here of one's I typically use. The difference between this one and mine is this one is saving to the same folder and using the same image names but adding the model name to the end so thereās no need for a Math node. You do lose a bit of control going with this method.
SIMPLE BLENDED OUTPUT
I have used a x2 model against a x4 model to showcase what this chain does. Itās just two separate upscales overlaid on one another with a Blend Images node and an Opacity node to control the visibility of the overlay layer (upscaled image). If you are familiar with Photoshop, you will be very at home with the Blend Images node since it uses the same/similar blend modes as PS layers.
CAPTIONED COMPARISONS / TWO MODEL COMPARISONS / SIMPLE COMPARISON
CAPTIONED COMPARISON
This is how the chain looks for a basic comparison. This is what people use for their model previews, youāll see this used a bunch in general. Thereās basically three presets that kind of do the same thing so Iāll only be explaining it one time with the Captioned Comparisons preset and showing examples for the other two (Two Model and Simple.)
The node that matters most in this chain is the Stack Images node. This will stack our images either vertically or horizontally into one image. You can hit the button with the plus sign to add more images to your stack.
The Add Caption node will add the name of the model being used for the image as text either on top or at the bottom of the image. By connecting it to the name of the Load Model node, it will use that as the caption so it changes dynamically and you donāt have to type it out. note: the size of the text in the comparison is also determined by the size of the image see a better example below.
TWO MODEL COMPARISON
(since the third caption node is connected to the load image node itās pulling from the image file name, break the green line and type in a custom caption or keep it in mind while naming your files.)
SIMPLE COMPARISON
No captions, no OG image, just a simple comparison of two models.
This is covering the basics of the chaiNNer layout. This is not meant to be a comprehensive guide on how to use chaiNNer (like photoshop and blender it has many different uses, many of which we donāt use or need most of the time) this is meant to show you the layout, quick features and upscale chain. This will mostly be useful to people that have some experience (AI) upscaling already but have never used chaiNNer.
For an extensive guide check out Kartoffelās video series/tutorials on video game upscaling. https://trello.com/c/myNZJEBQ
First step before you do anything is make sure you have a model(s) ready. I have mine in a folder under documents, it doesnāt have to be in a specific place you can load one straight from the downloads folder. Download models from the database here look for pytorch models primarily but you can play around with NCNN too Iāll explain the different step for using those later. I use pytorch models 99% of the time so Iāll be using pytorch for this.
chaiNNer link (chaiNNer git link with install section) is easy to install now, itās fairly plug and play just download, run the installer and then download dependencies through the app.
If you have multiple GPUs or want to use your CPU/memory limit. Those are all located under the settings gear icon (top right) and the Python tab. You can also enable system Python here, if you already have it installed, over downloading the integrated version (check github page for more info).
Onto the good stuff, these are the nodes you will be using most of the time. You can use the search bar on the top left or the scroll bar. You can also right click anywhere on the grid to bring up a mini version of the node panel, search bar included. The tabs we will be pulling from are Images and PyTorch.
You can drag and drop the nodes onto the grid, create links to connect nodes. Click on the lines to break them or drag and move them somewhere else. You can also start to create a link and drop it on the grid instead to bring up a list of other nodes it could connect to. (if you need to delete a node select it and use del key)
If you look to the left bar youāll see tabs separating PyTorch/NCNN/ONNX these are what you use if you want to use an NCNN model for example over PyTorch in your upscale. The nodes that are orange in the pic below are the ones from the PyTorch tab (red is Images) you would just swap them to nodes from one of the other tabs mentioned.
The chain is centered around the Upscale Image node, the only other nodes we need are the ones that fulfill what it requires. Being an input model and image and specifications for an output image. Since youāll be loading a PyTorch model, you need to grab the Load Model node for PyTorch. Since you need to load an image and preview it we grab the Load Image and View Image (External/ is not required but it pops it into a separate window which looks nicer imo) when you are satisfied with your upscale you would switch out the View Image for Save Image node and specify format/save location/name.
When you have your path/chain set up hit the green play (Run) button at the top (F5 key works too). Depending on your setup, and how large your upscale is (I get lag at 5k but used to get lag at 2k and up on my old laptop) it could be very quick or a longer wait, check the top right corner to see how much resources itās consuming. Thatās it thatās the basics on setting up a chain and running it to get your upscale.
Thereās many extra nodes you can use to get the results you want with upscaling. Thereās nodes for transparency, interpolating models, (pre/post upscale) resizing, batch upscales etc. It's important to remember that the nodes before the upscale image node are affecting the image before the upscale the ones after the node will be affecting the upscaled image.
before (429KB / 656 x 447)
after (5.34MB / 2624 x 1788)
model used / NMKD YandereNeo 4x
I don't know where exactly the top image image was from, it has a bunch of different sources. I can tell you it's a frame from EP1 of NGE.