Supir Upscaling
What is SUPIR Upscale?
SUPIR is a state-of-the-art image enhancement and upscaling model. It can upscale an input image to a size (i.e., resolution) that is anywhere from 2 times to 8 times larger than its original size (per dimension). More importantly, SUPIR can add details to the input image while remaining faithful to the image’s main content. For instance, if your low-resolution input image contains blurry faces, SUPIR can add the necessary details and produce clearer faces. Even if your image is already of “good quality”, SUPIR can push its realism even further with more details. This becomes even more important when you upscale an image to high resolutions where details matter. At the end of the day, SUPIR is a generative model (a type of ControlNet) and therefore the scaling factor, the amount of detail added, how “creative” the model should be when adding detail, and how strictly the model should adhere to the prompt, are aspects that are controlled by the user through various parameters in our studio. The following is a description of these parameters and the effect they have on the generated image. (For prompts and negative prompts see main studio tutorial)
Acknowledgement: This model is provided by SupPixel.
Note that this is a PRO feature.
Where is SUPIR’s interface?
In the main studio panel, navigate to the SUPIR UPSCALE tab. There, you can upload your input image and find all the necessary settings and parameters for SUPIR.
Image to Upscale
The input image can be uploaded directly in the Image to Upscale section (see above). Alternatively, you can select Upscale from the control panel next to the image as it appears on canvas. The image will be automatically placed in the Image to Upscale section.
Upscaling and Creativity Settings
Upscale
This is the upscaling factor. For example, if set to 2 when the input image has a resolution of HxW then the generated image will have a resolution of (2H)x(2W). You may notice that there is an option to set the upscaling factor to one. In that case the original resolution is preserved. SUPIR will simply add details to the input image.
Min Size
This value determines the minimum size of the smallest of the two dimensions in the generated image. For example, if the resolution of the input image is 200x100, the upscaling factor is set to 2 and Min Size is set to 250, then the output image will be upscaled by a factor that is larger than 2 (in fact 2.5) to satisfy the requirement that the smallest dimension should be at least equal to 250. The resulting image, in this case, will have a resolution of 500x250. If the upscaling factor already satisfies that requirement, then the final resolution is solely determined by that upscaling factor. In the same example, with a factor of 4, the resulting dimensions will be 800x400 and Min Size is ignored.
EDM Steps
Number of steps for the EDM Sampling Scheduler. The value determines how many iterations the sampling process will take. A larger number means more refinement (more details) but also consumes more time. To observe what details have been added by SUPIR you can go to your canvas, click on the output image, and from the control panel select Preview. By moving the horizontal scroll bar, you can see how the original image is enhanced by SUPIR. The original is always on the left side of the vertical bar, and the generated image on the right side.
Note that increasing the number of EDM steps to values above 50 may lead to diminishing returns in terms of the details added, and in some cases, it might even cause degradation in image quality.
Original | EDM Steps = 1 |
EDM Steps = 50 | EDM Steps = 100 |
s_stage2
Control strength for second stage of processing. Typically, this should be enabled (value should not be negative). Generally, smaller values give more “freedom” to the model to be creative when adding details/upscaling. Often, to achieve creative outputs, s_stage2 should be set to values lower than 1. Values greater than one constrain the model even further, and the upscaled image will be very close and faithful to the original one in terms of content and style.
Since the impact of this parameter is hard to predict a priori and depends on the content and style of the input image, a recommended approach is to start with s_stage2 = 1 and use the resulting image as a reference point.
s_stage2=0 | s_stage2=1 | s_stage2=2 |
EDM Noise
This parameter influences the variability of the details that are added. The default value is 1 and under this choice SUPIR remains conservative. When the value is increased this may cause the model to “imagine” and create new objects in the generated image.
The output is very sensitive to EDM noise. Very large values may create “salt and pepper” noise that basically distorts the output image. The recommended approach is to experiment with values between 1 and 1.2
The most pronounced effects can be observed when s_stage2 is set to be slightly less than 1 and EDM noise increased to be slightly above 1. The latter instructs the model to be more creative, but the details added will be mostly confined within the major segments and components of the original image. This is because setting s_stage2 to be slightly less than 1 (e.g., 0.9) tells the model to respect the major objects but allow some room for creativity within these objects.
Original | Noise=1.005 | Noise=1.1 | Noise=1.5 (too large) |
Noise=1.005 | Noise=1.1 |
Color Fix Type
This parameter allows for the selection of the color correction method that will be applied once generation is complete, with options including “None”, “AdaIn”, and “Wavelet”. When an image is upscaled, “new” pixels are generated to create details. One possible side-effect is that the coloring patterns of the image might be affected. Color correction methods are applied to (a) ensure hues remain faithful to the original image, (b) saturation is preserved, (c) the balance between contrast and brightness is maintained.
Advanced Settings
Seed
Seed Values are the initial input parameters or random values that influence the generation process. You can use the same seed to obtain the same image output as a previously generated image, while using random seeds allows for exploration of different outputs. It is usually best to enable Randomize Seed for beginners. If you have a specific AI image you want to recreate, and you have all the other information to do so (such as prompts, negative prompts, CFG, EDM steps, etc.), inputting the seed value can precisely guide the generation process. Seed values serve as a starting point for the generation process and control the creative output of the models.
s_stage1
Restoration control for the first stage of processing. A negative value indicates that this stage is not used. This parameter can be useful when restoring an image of very poor quality. SUPIR is instructed to perform a generative pass before upscaling, hence “imagining” some details from the get-go. Smaller values increase creativity when doing so. Note that very large values force the model to retain artifacts in the original image and this may cause undesirable effects. Recommended values when restoring are 1-3. This stage is typically disabled in most workflows, hence the default value is -1 (disabled).
Original | -1 (disabled) | 1 | 3 |
Llava and Face Fix
The recommended setting is to have use_llava enabled and face fix disabled.
Guidance CFG Scale
CFG stands for Classifier-free Guidance, which adjusts how closely the output image will match what you describe in the prompt. Be cautious with this setting as it can have undesirable impact on your results, especially at higher values and when control strength (s_stage2) is low. CFG scale ranges in the studio from 1 to 20.
Linear CFG and Linear Control
These settings allow for a linear increase of the CFG and s_stage2 parameters from their start points (spt_linear_CFG and spt_linear_s_stage2) to their specified values through the process, providing a way to dynamically adjust the guidance and control strength.