NVIDIA's Align Your Steps (AYS): Improve Outputs in SD/SDXL/SVD with Sampling Schedule Voodoo
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.
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
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.
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.
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.
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.
References
- Test workflows https://github.com/sandner-art/ai-research/tree/main/NVIDIA_AYS
- NVIDIA Align Your Steps: Optimizing Sampling Schedules in Diffusion Models https://research.nvidia.com/labs/toronto-ai/AlignYourSteps/
- GITS article, https://github.com/zju-pi/diff-sampler
- GITSScheduler, AlignYourStepsScheduler (check the test workflows above)