NVIDIA's Align Your Steps (AYS): Improve Outputs in SD/SDXL/SVD with Sampling Schedule Voodoo

How to use NVIDIA's Align Your Steps (AYS) in A1111 and ComfyUI

Align Your Steps (AYS) allows a crisp image with a very low number of steps. ComfyUI already supports this algorithm natively, and it works pretty well after trying it for 6-10 steps. AlignYourStepsScheduler in the nodes list. In A1111 you may experiment with Align Your Steps scheduler.

It fixes the output with low steps, removes artifacts and also outputs cleaner image. It shifts the output towards realism, which can be good in some cases.

The difference in output with more steps in finetuned models (especially SDXL) is not so dramatic—but often it may fix limbs and hands.

NVIDIA Align Your Steps in SDXL low steps image generation
AYS in SDXL model (finetuned SDXL 1.0 Cinematix), result in 10 interpolated steps (right image)

Workflows

I have some test Comfy workflows for SD and SDXL here: https://github.com/sandner-art/ai-research/tree/main/NVIDIA_AYS .

Just drag and drop the workflow file or an image into your ComfyUI Workflow screen.

Best samplers for use with AYS in my test were: dpmpp_2m, dpmpp_2s_ancestral, dpm_adaptive

NVIDIA AYS technique comparison in SDXL model
41 steps SDXL NORMAL/AYS image comparison: although the image quality is comparable, AYS is closer to the prompt (the model is holding an object)

Nodes Supporting AYS XL, SD1, SVD

Update your Comfy UI into the latest version before trying the workflows. 

A1111 (Using AYS Schedule Type in SD 1.5 and SDXL)

In A1111 you will use the schedule type to test this technique. You will find AYS option under the Schedule type dropdown.

Stable Diffusion SD 1.5 test AYS Align Your Steps
SD 1.5 test AYS DPM++ 2M: Given the number of steps, AYS has the best details even at 7 steps
SDXL AYS Align Your Steps as scheduler in A1111 UI, comparison of outputs of generative AI
SDXL: DPM++ 2M, 11steps, CFG 5, Align Your Steps Scheduler. (SDXL test merge model Syntetix) notice visible artifacts in the Normal scheduler in low steps.

In SD 1.5 the AYS sampler is beneficial in some scenarios (Note: SGM  Uniform scheduler performs also nicely in low steps). In SDXL Lightning models,  AYS scheduler can produce artifacts, but it seems to be the best solution for low step rendering in a normal SDXL model. Remember to use around 10 steps with Align Your Steps scheduler. I suggest to try the technique also in ComfyUI or Forge:

Align Your Steps and GITS in Forge (SDXL+SD1.5)

You may test AYS schedule in Forge UI (simple install instructions in this article on FLUX model), just select it as a scheduler type. Best results for SDXL seems to be with DPM++ 3M SDE and DPM++ 2M SDE sampling, but you may try a different one especially for the 1st pass render. 

NOTE: For SD 1.5+AYS, start experimenting with DPM++ 2M, DPM++ 2S a, Euler a, HeunPP2.

Align Your Steps in Forge using SDXL, test on a group photo
DPM++ 3M SDE, 1024, SDXL (Cinematix) "A photo of a group of realistic people. focus on faces in the crowd with various emotional expressions. The overall scene has a warm hue." No negative prompt.

As you may see on the image above, with higher number of steps the output converge to a similar output. The best number of steps is around 10 for AYS. 

SD 1.5 with Align Your Steps scheduler, comparison demonstrated on a group photo.
SD 1.5 (Photomatix) The same promptas above. HeunPP2. AYS with lower steps can be also used for an artistic effect.

Conclusion

AYS technique is a very interesting option to use with a decent SDXL model, when you are aiming for realism and very fast outputs. It is worthwhile testing it for your specific use, especially if you are going for realism or photography.  

It's fascinating to compare the results of AYS approach, with the novel FLUX.1 (schnell) model and also with the DMD2 technique. All these options demonstrate impressive advancements in image generation quality, particularly given the relatively low number of steps required.

AYS align your steps effective realistic portrait
dpmpp_2s_ancestral interpolate_to_steps 6 (right)

References

Updated:

You may also like:

Subscribe

Stay connected to make sure you don’t miss anything. Join our newsletter community for artists, designers, and art and science enthusiasts.