A Practical Explanation of ‘Second Pass’ in SD.Next with SDXL 1.0

AI Samurai
3 min readJul 29, 2023

--

A scene of a beach in the background, a glass spherical container in the foreground. A dragon statue is inside the container.

With the 1.0 release of SDXL comes new learning for our tried-and-true workflow. I will focus on SD.Next first because, the last time I checked, Automatic1111 still didn’t support the SDXL refiner.

If you have been using SD.Next lately, you will know that “Hires Fix” has been folded under the “Second Pass” section. This same “Second Pass” section is what you can use for the SDXL Refiner.

If you haven’t done so already, go to Settings > User Interface > Quicksettings list and add “sd_model_refiner” to your list.

After a restart, you will see another drop-down box next to the usual SD model checkout with a label saying “Stable Diffusion refiner”.

Choose the SDXL 1.0 base model for the SD checkpoint, and the refiner 1.0 model for the refiner checkpoint (isn’t that obvious?).

Now, when you check the “Second Pass” checkbox, the “Second Pass” section should be revealed. I say “should” here because the UI doesn’t always work. If it doesn’t work, try reloading the page.

The first pass will use the SD 1.0 base model, and the second pass will use the refiner model. The Latent upscaler isn’t working at the moment when I wrote this piece, so don’t bother changing it.

The settings for “Secondary sampler” and “Secondary steps” should be obvious. What you want to pay the most attention to are “Denoising strength” and “Denoise start”. The image below shows the result of using various values for these two settings. Initially, I thought that by inputting a value for “Denoise start”, “Denoising strength” would be ignored, but as you can tell from the results below, this is only true when “Denoise start” is not 0 or 1.

Results of running the second pass in various settings

As far as I can tell, there’s no difference between the result of the first pass when “Denoise start” is either 0 or 1. It basically just runs the first pass until the very end, before passing the result to the second pass for further processing. Given that the result from the two scenarios resembles the result when “Denoise start” is at 0.05, my guess is that when “Denoise start” is set to 0, the value is completely omitted from the pipeline. Essentially, this means completing the entire first pass, applying maximum denoising, and then transferring the result to the second pass. This process produces an outcome akin to when the value is set to 1. After achieving this maximum denoising, the refiner initiates the second pass, which ultimately generates a result comparable to a scenario where “Denoise start” is positioned at 0.05, close to the maximum denoise level.

In practice, we can completely ignore what happens behind the scenes. All we need to know is the following:

a) Set “Denoise Start” to anything other than 0 or 1. The higher the value, the closer the result of the second pass will resemble the one from the first pass. “Denoise strength” has no effect in this scenario.

b) Set “Denoise Start” to either 0 or 1. Then, the lower the value we set for “Denoising Strength”, the more the result of the second pass will resemble the one from the first pass.

--

--

AI Samurai
0 Followers

AI-art enthusiast, AI Samurai. Unveiling the beauty of generative AI. Brushing strokes where algorithms meet aesthetics. Join the journey!