>>> Increase the resolution of the image
Increasing the resolution of an image or video and improving its quality is called upscaling. There are several ways to upscale in Stable Diffusion, but here we will use Hires.Fix (Hi-resolusion fix) to increase the resolution without having to install an extension. Hires.fix is a function that creates an image with a set resolution and then increases the quality by a specified ratio.
>>>Load image information from PNG info and increase resolution
First, set it so that it can generate an image that is the same as the image whose resolution you want to increase. Up until now, pressing the Generate button has generated a different image every time, because the Seed is set to random. The initial setting is Seed:-1, which means that it generates randomly.
If you set the same Seed value and match other conditions, you can generate an image that is exactly the same.
You can check the Seed value in the parameters of the preview when the image is generated.
You can also easily check the image creation parameters, including the Seed and Prompt of the generated image, in the PNG info tab. Click the PNG info tab to open it. Any image will do, so drag and drop it to Source or select it from a folder and upload it, and you can see the parameters saved in that image.
Now that we're ready, let's try using Hires.fix. When we check Hires.fix and enable the feature, a box menu will open, allowing us to specify a few parameters.
- Upscaler
Select the type of upscale algorithm to use.
- Hires. steps
Specifies the number of steps to create a high resolution.
- Denoising strength
Specifies the degree of noise removal.
- Upscale by
Specifies how many times the resolution of the original image will be created.
This time, set Upscaler: Latent, Hires. steps: 20, Denosing strength: 0.7, upscale by: 2 respectively. Click Generate to generate an image with improved resolution.
This concludes the basic txt2img image creation task. Now let's look at some more detailed parameter adjustments and some handy, versatile prompts.