💦 CREATE AND FUCK YOUR OWN AI CUMSLUT 🔥 TRY NOW ♥
Create AI Cumsluts 💦
February 28, 2024

SUPIR Full Tutorial + 1 Click 12GB VRAM Windows & RunPod / Linux Installer + Batch Upscale + Comparison With Magnific - SUPIR Starts A New Era

Patreon exclusive posts index

Join discord and tell me your discord username to get a special rank : SECourses Discord

I have dedicated several days, working over 12 hours each day, on SUPIR (Scaling-UP Image Restoration), a cutting-edge image enhancement and upscaling model introduced in the paper Scaling Up to Excellence: Practicing Model Scaling for Photo-Realistic Image Restoration In the Wild.

This model is simply mind-blowing. At the bottom of this post, you will see side-by-side comparisons of SUPIR versus the extremely expensive online service, Magnific AI. Magnific is known to be the best among the community. However, SUPIR is by far superior. SUPIR also significantly outperforms Topaz AI upscale. SUPIR manages to remain faithful to the original image almost 100% while adding details and achieving super upscaling with the best realism.

I made a full 33-minute tutorial, fully chaptered with manually written captions. The chapter's info is posted at the very bottom.

You can watch the video here: https://youtu.be/PqREA6-bC3w 

SUPIR: New SOTA Open Source Image Upscaler & Enhancer Model Better Than Magnific & Topaz AI Tutorial

You can join our 6500+ member Discord for any help & discussion: https://discord.com/servers/software-engineering-courses-secourses-772774097734074388

Original repo of SUPIR: https://github.com/Fanghua-Yu/SUPIR

I have worked hard to make a 1-click installer for Windows & RunPod. RunPod uses Linux, thus if you are a Linux user you can use RunPod files to install locally on Linux as well with a 1-click install.

Full instructions are shared in this post along with the scripts: https://www.patreon.com/posts/supir-1-click-99176057

Here are the installer files:

The installer works with Python 3.10.11. It generates a new pip venv and installs everything there. So you don't need Conda. Since it will generate its own VENV, it will not affect any other installations on your system.

The installer installs xFormers and Triton (we are using a pre-compiled wheel) and Pytorch 2.2.0 automatically for you on Windows and Linux.

The Gradio app launching interface is shown below:

Currently, with the newest optimizations, the SUPIR app works great on RTX 3060 without LLaVA. I have tested it on my 12 GB single RTX 3060 GPU. So if you have a GPU that has 12GB or more VRAM, you can use it.

The installer downloads all models automatically as well. Also, I changed the base SDXL model with Juggernaut XL - V9 since it works better.

You can simply use any SDXL model. Instructions are on the Patreon post.

I also greatly improved the base Gradio APP. I made the interface more usable.

I added the number of images and randomized seed features. I made the image upscale scaler 0.1 precision.

Moreover, I have added a batch upscale feature as well.

You can see the improved advanced Gradio app interface below.

All the images the app generates will be automatically saved under the outputs folder. You can define the batch image processing outputs folder as well.

Here is the content of the Patreon post:

The chapters of the tutorial are as follows:

  • 0:00 Introduction to SUPIR (Scaling-UP Image Restoration) full tutorial

  • 2:10 How to download and install SUPIR on Windows or RunPod (thus Linux)

  • 3:19 How to setup a community Pod on RunPod's newest interface

  • 4:33 How to install and start SUPIR on RunPod

  • 7:10 How to use Proxy connect of RunPod

  • 8:13 How to install and start our own quantization supporting LLaVA

  • 9:22 Getting image description from our own LLaVA model

  • 9:42 How to use SUPIR interface and testing camel image (test image 1) on SUPIR in details

  • 12:07 Testing a very old family photo enhancement and upscaling with SUPIR (test image 2)

  • 14:34 Where the generated images are saved

  • 14:53 Testing the image of Arnold Schwarzenegger as a warrior (test image 3) on SUPIR in details

  • 16:22 The effect of simple prompt vs detailed prompt

  • 17:30 Testing a dragon statue enhancement and upscaling with SUPIR (test image 4)

  • 17:42 How I used ChatGPT Plus / GPT-4 for image captioning

  • 18:29 The model works with literally every resolution and example very big upscale

  • 19:00 Testing image of a dinosaur in jurassic park image enhancement and upscaling with SUPIR (test image 5)

  • 19:41 From 500px to 3000px upscale results and how to do very big upscale properly

  • 22:39 GPU utilization of the SUPIR scripts

  • 23:15 If you get out of VRAM error what can you do and how you can solve

  • 25:22 Testing a MonsterMMORPG Game character (anime like drawing) upscaling and image enhancing (test image 6)

  • 25:39 What to do if your image has transparent pixels to be able to upscale

  • 27:35 Testing a black and white colored movie screenshot of a man image enhancement and upscaling with SUPIR (test image 7)

  • 28:29 Testing a screenshot from the movie Predator enhancement and upscaling with SUPIR (test image 8)

  • 29:12 The queue ability of the Gradio app of SUPIR

  • 29:49 Testing an old photo of Muhammad Ali in a boxing stance image enhancement and upscaling with SUPIR (test image 9)

  • 30:45 Testing a black and white colored movie screenshot of Charlie Chaplin image enhancement and upscaling with SUPIR (test image 10)

SUPIR vs MAGNIFIC AI

Carefully look at the how much SUPIR can be loyal to the original image vs Magnific can be loyal to original image

Comments (34)

m
meteor 1942 · July 18, 2024

past couple of days this has gotten really slow loading the SUPIR model. GUI loads up fine. It's just the first time loading yaml has gone from something like 200 seconds to 6000 seconds. Have already tried wipe and brand new install along with new env - none of that helped. Subsequent image upscaling (after first loading of SUPIR model) are performing as expected.

S
SECourses: FLUX, Tutorials, Guides, Resources, Training, Scripts · July 18, 2024

looks like your harddrive is failing. you can monitor your hdd speed while model is getting loaded from task manager > performance > hdd

S
Storm Hawks HD · March 14, 2024

Hi, I've just finished the install but I'm getting this when I try to launch: "Traceback (most recent call last): File "J:\SUPIR\SUPIR\gradio_demo.py", line 12, in import gradio as gr File "J:\SUPIR\SUPIR\venv\lib\site-packages\gradio\__init__.py", line 3, in import gradio._simple_templates File "J:\SUPIR\SUPIR\venv\lib\site-packages\gradio\_simple_templates\__init__.py", line 1, in from .simpledropdown import SimpleDropdown File "J:\SUPIR\SUPIR\venv\lib\site-packages\gradio\_simple_templates\simpledropdown.py", line 6, in from gradio.components.base import FormComponent File "J:\SUPIR\SUPIR\venv\lib\site-packages\gradio\components\__init__.py", line 1, in from gradio.components.annotated_image import AnnotatedImage File "J:\SUPIR\SUPIR\venv\lib\site-packages\gradio\components\annotated_image.py", line 9, in import PIL.Image File "J:\SUPIR\SUPIR\venv\lib\site-packages\PIL\Image.py", line 84, in from . import _imaging as core ImportError: cannot import name '_imaging' from 'PIL' (J:\SUPIR\SUPIR\venv\lib\site-packages\PIL\__init__.py)" Options selected, 1, 1, 2

S
SECourses: FLUX, Tutorials, Guides, Resources, Training, Scripts · March 14, 2024

hi. the reason is you installed parent name as SUPIR. please reinstall into a different parent name like SUPIR_AI\SUPIR . also make sure to use Python 3.10.11

A
Allan Zhou · March 12, 2024

I have finished the installation, but the runtime appears[huggingface_hub.utils._errors.RepositoryNotFoundError: 401 Client Error. (Request ID: Root=1-65efe55e-5b62dda212cf1cf774008a8f;200d3fbf-0ecd-44df-9504-1c67af59f33f) Repository Not Found for url: https://huggingface.co/api/models/models/clip-vit-large-patch14/revision/main. Please make sure you specified the correct `repo_id` and `repo_type`. If you are trying to access a private or gated repo, make sure you are authenticated. Invalid username or password. Label changed: An exception occurred. Please try again.] any suggestions for this ?

S
SECourses: FLUX, Tutorials, Guides, Resources, Training, Scripts · March 12, 2024

hello. are you using python 3.11? can you let me know your Python version?

N
Neil Rhodes · March 5, 2024

How do i get older versions back, I upgraded to 22 and its terrible now slower and messes up faces like it didn't before , id like to install version 18 as that was working just fine, now too many options and it producing results i dont like can you advise how i go back to older versions *running 12GB card" - Stage 1 run now takes 40 seconds or more whereas it used to take around 4 to 8 for me.

S
SECourses: FLUX, Tutorials, Guides, Resources, Training, Scripts · March 5, 2024

sure you can. open a CMD on SUPIR folder and type this : git checkout e8a7d95602c023ec3bfac42e91e8e039db647e39 dont forget to restart app

p
puk · March 3, 2024

The app is finally running smoothly i can upscale on my 4090 up to 4x and still have enough v ram left. Is there a way to use the full v-ram for 4090 cards in the hope that the app will run faster? Also, the results have a much better quality with good texting. Thanks for this great app. Keep up the good work.

S
SECourses: FLUX, Tutorials, Guides, Resources, Training, Scripts · March 4, 2024

thank you so much. well it will use vram according to your final upscale resolution. i just merged with the newest repo updates. so if there be further improvements hopefully i will add

j
jamzsam · March 2, 2024

I Have a RTX 3060 but i get this.

j
jamzsam · March 2, 2024

Please select an option: 1. Start As Half Params - Uses Lesser VRAM Preferred 2. Start As Full Params Enter your choice (1-2): 1 Please select an option: 1. Start Using Tiled VAE - Uses Lesser VRAM Preferred 2. Start Without Tiled VAE Enter your choice (1-2): 1 WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for: PyTorch 2.2.0+cu121 with CUDA 1201 (you have 2.2.0+cpu) Python 3.10.11 (you have 3.10.6) Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers) Memory-efficient attention, SwiGLU, sparse and more won't be available. Set XFORMERS_MORE_DETAILS=1 for more details ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ C:\Users\James\Documents\UpScaler\SUPIR\gradio_demo.py:44 in │ │ │ │ 41 │ SUPIR_device = 'cuda:0' │ │ 42 │ LLaVA_device = 'cuda:0' │ │ 43 else: │ │ ❱ 44 │ raise ValueError('Currently support CUDA only.') │ │ 45 │ │ 46 # load SUPIR │ │ 47 model = create_SUPIR_model('options/SUPIR_v0.yaml', SUPIR_sign='Q') │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ ValueError: Currently support CUDA only. Press any key to continue . . .

J
Joel Kruse · March 1, 2024

Would love to see a batch processing script that takes advantage of the lower vram settings. I think just a couple lines from the Gradio start file could be added to the test.py file.

S
SECourses: FLUX, Tutorials, Guides, Resources, Training, Scripts · March 2, 2024

I added batch processing to the gradio with support of low VRAM. what else you mean? I am working on adding more features right now by the way

N
Nenad Kuzmanovic · February 29, 2024

It is not installing models in cache folder, but in the install folder.. Is that normal? cause it's 26 gb and would like to have it where the other models are (cache folder)..

S
SECourses: FLUX, Tutorials, Guides, Resources, Training, Scripts · March 1, 2024

yes normal. because these are not diffuser files. but you can change folder path from config yaml inside options folder and CKPT_PTH.py file inside the main SUPIR folder

A
Alex · February 28, 2024

Hi I have a bug when I click on "start_SUPIR_WIndows.bat" I have click first on the windows install of course and when I launch the start windows I get this error " OSError: openai/clip-vit-large-patch14 does not appear to have a file named pytorch_model.bin, tf_model.h5, model.ckpt or flax_model.msgpack."

A
Alex · February 29, 2024

Ok it's a error when I install it's because hugging face is in maintenance..... " ERROR: HTTP error 501 while getting https://huggingface.co/MonsterMMORPG/SECourses/resolve/main/triton-2.1.0-cp310-cp310-win_amd64.whl"

B
Bartosz Polecki · February 28, 2024

This is super cool stuff, not yet CSI show level but man with how fast AI is going forward i will not be surprised if in a year we'll able to zoom 100x and clear image to perfect focus ;)

S
SECourses: FLUX, Tutorials, Guides, Resources, Training, Scripts · February 29, 2024

haha so true :)

B
Betinho Formado · February 28, 2024

Hi There, I was trying the one click instal on Windows with RTX3090 and I'm having weird results, the installer for Windows not matter the config gives me a weird message "Setting up MemoryEfficientCrossAttention. Query dim is 1280, context_dim is 2048 and using 20 heads with a dimension of 64. BasicTransformerBlock is using checkpointing Loaded model config from [options/SUPIR_v0.yaml] Press any key to continue . . ." after press just closed and I can see on the tutorial should give a gradio link but for me doesn't show anything, it doesn't give me URL just close the windows any Idea why?

S
SECourses: FLUX, Tutorials, Guides, Resources, Training, Scripts · February 28, 2024

hi. I suspect you have problems at installation. What is your python version? can you delete your folder , reinstall and show me reinstall CMD window entire results? you can join our discord and show there too

B
Betinho Formado · February 28, 2024

I running on my RTX3090for some reason at the end says to press any button and closes doesn't give me a gradio link, like on the tutorial I try the option with half size in case same thing. Anything extra on Windows? maybe do a video showing on Windows? I'm getting this message at the end "64. Setting up MemoryEfficientCrossAttention. Query dim is 1280, context_dim is 2048 and using 20 heads with a dimension of 64. BasicTransformerBlock is using checkpointing Loaded model config from [options/SUPIR_v0.yaml] Press any key to continue . . ." after press, nothing happens?

S
SECourses: FLUX, Tutorials, Guides, Resources, Training, Scripts · February 28, 2024

Hello. Do you have python 3.10.11? First you did run windows_install , it is fully run and then you are using start_SUPIR_Windows right?

A
Art · February 28, 2024

there's no hope for a kaggle version?

S
SECourses: FLUX, Tutorials, Guides, Resources, Training, Scripts · February 28, 2024

There is. If authors fix FP16 bug we can make Kaggle hopefully

K
Kallamamran · February 28, 2024

A version in the Gui would be nice so we can see what SUPIR is running :)

S
SECourses: FLUX, Tutorials, Guides, Resources, Training, Scripts · February 28, 2024

Haha nice idea :) Will do hopefully

s
sadelcri · February 28, 2024

if i have a rtx 3090 ti, what config should I use for SUPIR? half params/full params? tiled VAE / without?

S
SECourses: FLUX, Tutorials, Guides, Resources, Training, Scripts · February 28, 2024

1 and 1. Option 2 is for 32 GB + GPUs

E
Elevo · February 28, 2024

My research has shown that if you enlarge a picture with text you should not specify promt on top and use SDXL BASE 1 model then the text will be normal, but if you use Juggernaut then the model will change your text for the worse.

S
SECourses: FLUX, Tutorials, Guides, Resources, Training, Scripts · February 28, 2024

I see. Good tips. Thanks.

S
So Sha · February 28, 2024

Thanks Furgan, but unfortunately it doesn't work on local os linux. I'm getting this error when I want to run it: File "/media/ig/supir/SUPIR/gradio_demo.py", line 5, in from gradio_imageslider import ImageSlider ModuleNotFoundError: No module named 'gradio_imageslider'

S
SECourses: FLUX, Tutorials, Guides, Resources, Training, Scripts · February 28, 2024

You couldn't properly install it. It works on Linux. I installed many times on RunPod. RunPod uses Linux. Try to install with RunPod instructions. What is your Python version 3.10.11?