#upscalingtutorial
Explore tagged Tumblr posts
dreamstate-portfolio · 1 year ago
Text
Tumblr media
chaiNNer (AI) Upscale Basics
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
Tumblr media
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.
Tumblr media
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.
Tumblr media
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).
Tumblr media
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.
Tumblr media
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.
Tumblr media
before (429KB / 656 x 447)
Tumblr media
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.
0 notes