Timestep Spacing, leading or trailing

#1
by Vargol - opened

Hi,
the SDXL-Lightning scheduler config uses "timestep_spacing": "trailing" and there code explicitly sets in the example code with a comment

# Ensure sampler uses "trailing" timesteps.
pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing")

I noticed your scheduler config uses leading instead. Was this deliberate, something you found during testing.
It does make quite a different especially at low steps, too much to compare directly but a lot more contrast.

These two images are the same seed, prompt, steps, cfg and scheduler etc, I just changed the scheduler_config.json
```
$ diff scheduler_config.json scheduler_config_copy.json
18c18
< "timestep_spacing": "trailing",

"timestep_spacing": "leading",

leading

![309fb54e-4788-40a8-9926-b30131951d2c.png](https://cdn-uploads.huggingface.co/production/uploads/6307c27ff0dc38fb47bdf6bf/PlmIFpLC9iRJcH5UnAoUz.png)


trailing

![7717788a-c992-424d-b386-d7c0208b2ea8.png](https://cdn-uploads.huggingface.co/production/uploads/6307c27ff0dc38fb47bdf6bf/GPOjl0Ziz4zbU-Vl2bYXc.png)

Better set of example there are the thumbnail of my 6 test prompt I use for giving models a quick test, sorry they're not it the same order, all parameters the same except the timestep spacing
You can see the difference in contrast between the two, oh the blue line around the unicorn in the "trailing" image is just a selection indicator

Leading

Screenshot 2024-02-22 at 10.01.48.png

Trailing

Screenshot 2024-02-22 at 10.00.57.png

Sign up or log in to comment