Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed random generator #266

Open
wonkyoc opened this issue May 16, 2024 · 2 comments
Open

Fixed random generator #266

wonkyoc opened this issue May 16, 2024 · 2 comments

Comments

@wonkyoc
Copy link

wonkyoc commented May 16, 2024

The current random generator is fixed by the designated seed number (default: 42). Although this is fine with generating a latent image, it is quite not right for ancestral sampling. The ancestral sampling adds a random noise at every step, but due to the fixed seed, every execution generates the same image, which should not happen.

@SA-j00u
Copy link

SA-j00u commented May 16, 2024

and all reproducibility will gone... 👎

@grauho
Copy link
Contributor

grauho commented May 16, 2024

Looking at rng.hpp and the de-noising code I believe this is already implemented correctly. Euler_a and dpm++2s_a get their random noise using the ggml_tensor_set_f32_randn function which sources it's rng from the RNG randn class method which in turn uses the base seed. Therefore, each de-noising step is "random" relative to each other de-noising step, but deterministic to the overall seed which I believe is the desired behavior.

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

No branches or pull requests

3 participants