Skip to content

feat: add Gradient Estimation sampler#1484

Open
wbruna wants to merge 1 commit intoleejet:masterfrom
wbruna:sd_gradient_estimation
Open

feat: add Gradient Estimation sampler#1484
wbruna wants to merge 1 commit intoleejet:masterfrom
wbruna:sd_gradient_estimation

Conversation

@wbruna
Copy link
Copy Markdown
Contributor

@wbruna wbruna commented May 10, 2026

Implements the Gradient Estimation sampler, from https://github.com/ToyotaResearchInstitute/gradient-estimation-sampler :

sd-cli --diffusion-model ./z_image_turbo-Q8_0.gguf --llm ./Qwen3-4B-UD-Q4_K_XL.gguf --vae ./ae_bf16.safetensors --cfg-scale 1 --steps 8 --sampling-method $sampler --scheduler simple --eta $eta -p 'a pretty flower' -W 768 -H 768

eta Euler Euler GE
0 test euler_a 0 test euler_ge 0
1 test euler_a 1 test euler_ge 1

I've called it 'euler_ge' because it's less of a mouthful than 'gradient_estimation', but arguably the latter would be more 'standard'?

For now, gamma is fixed at 2. We should probably implement a generic key=value option for this kind of sampling parameter.

The noise injection could be wrong: it works well with Simple and SGM Uniform, but other samplers tend to make noisy images.

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.

1 participant