Skip to content

Conversation

Green-Sky
Copy link
Contributor

@Green-Sky Green-Sky commented Sep 10, 2025

While looking into the Beta Schedule implementation, I realized that beta_dist(0.6, 0.6).ppf(x) looks very close to a simple smoothstep(x) function.

This feels too simple that no one else might have thought of doing this...

see #811 ( #811 (comment) )


output_2

Some values for 8 steps:

f(x) beta(0.6, 0.6) ppf smoothstep
f(1.000000) 1.000000 1.000000
f(0.875000) 0.942844 0.957031
f(0.750000) 0.824320 0.843750
f(0.625000) 0.670619 0.683594
f(0.500000) 0.500000 0.500000
f(0.375000) 0.329381 0.316406
f(0.250000) 0.175680 0.156250
f(0.125000) 0.057156 0.042969

Comparison:

beta(0.6,0.6) ppf smoothstep
output output

(Chroma1-HD-Flash-Q4_K_S)

@leejet
Copy link
Owner

leejet commented Sep 11, 2025

Thank you for your contribution.

@leejet leejet merged commit 49d6570 into leejet:master Sep 11, 2025
8 checks passed
@Green-Sky
Copy link
Contributor Author

Green-Sky commented Sep 11, 2025

Works great with SDXL lightning too. #198 (eg RealVisXL 5.0 Lightning).

output_15 output_4
output_7 output_8

Should work well anywhere you would choose simple or beta.

@Green-Sky
Copy link
Contributor Author

Green-Sky commented Sep 12, 2025

Custom flux.1-light-8b + hyper flux 8steps merge:

euler+discrete euler+smoothstep
hf1-lite-8b-8step-euler-discrete hf1-lite-8b-8step-euler-smoothstep
hf1-lite-8b-8step-euler-discrete2 hf1-lite-8b-8step-euler-smoothstep2

It clearly eliminates most artifacts I initially put down as quantization induced. (but text quality is reduced)

details

$ result/bin/sd -m models/hyper-flux.1-lite-8B-8step-q5_k.gguf --t5xxl models/flux-extra/t5xxl_fp16.safetensors --clip_l models/flux-extra/clip_l-f16.gguf -t 8 --vae models/flux-extra/ae-f16.gguf --sampling-method euler --scheduler smoothstep --steps 8 --cfg-scale 1 -p 'Photograph of the Alps. Vivid summer afternoon. Everything is perfectly in focus.' -v -W 768 -H 768 --diffusion-fa -o hf1-lite-8b-8step-euler-smoothstep.png --clip-on-cpu --vae-conv-direct

https://huggingface.co/Green-Sky/flux.1-lite-8B-GGUF/blob/main/lora-experiments/hyper-flux.1-lite-8B-8step-q5_k.gguf

@stduhpf
Copy link
Contributor

stduhpf commented Sep 12, 2025

Chroma flash with Heun + Smoothstep is great.

@Green-Sky
Copy link
Contributor Author

The comparisons for flux.1 schnell are less decisive, but I think smoothstep wins overall.

euler+discrete euler+smoothstep
flux1-schnell-4steps-euler-discrete1_8 flux1-schnell-4steps-euler-smoothstep1_8
flux1-schnell-4steps-euler-discrete1_2 flux1-schnell-4steps-euler-smoothstep1_2
flux1-schnell-4steps-euler-discrete1_4 flux1-schnell-4steps-euler-smoothstep1_4
flux1-schnell-4steps-euler-discrete1_5 flux1-schnell-4steps-euler-smoothstep1_5

Smoothstep seems to produce higher frequency noise in the final image, which helps fine details like hair strains a lot.

Just 4 steps with q4_k is really pushing the limits of visuals in any case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants