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

random seed leakage #10

Open
altsoph opened this issue Sep 30, 2021 · 3 comments
Open

random seed leakage #10

altsoph opened this issue Sep 30, 2021 · 3 comments

Comments

@altsoph
Copy link
Contributor

altsoph commented Sep 30, 2021

The current "seed" and "noise_prompt_seeds" arguments don't guarantee a fixed output.

Here are two results with the exact same arguments, including

pixray.add_settings(seed=42, noise_prompt_seeds=[42,])

image

image

They are pretty similar, which means the initial random image is the same.
However, there is some source of unseeded randomness, I think it will be great to locate and fix it :)

@dribnet
Copy link
Owner

dribnet commented Oct 3, 2021

Any chance you get better results if you leave off the noise_prompt_seeds? Just curious if that might be the source of it.

@altsoph
Copy link
Contributor Author

altsoph commented Oct 3, 2021

Any chance you get better results if you leave off the noise_prompt_seeds? Just curious if that might be the source of it.

I tried it with the same results

@robinsloan
Copy link

I suspect that CLIP is the culprit!

See: openai/CLIP#13

I suspect it's due to CUDA's nondeterministic behavior, as it doesn't happen in the CPU mode. Slight numerical imprecision is sometimes inevitable, especially when dealing with half-precision models. A workaround is to "warm up" the model as you did, and after a third call or so it'll more likely emit deterministic outputs.

EleaZhong pushed a commit to EleaZhong/pixray that referenced this issue Feb 26, 2022
EleaZhong pushed a commit to EleaZhong/pixray that referenced this issue Feb 26, 2022
output_dir can be a new directory

also removes some short flags as these are starting to drive me crazy.

Fixes dribnet#10
EleaZhong pushed a commit to EleaZhong/pixray that referenced this issue Feb 26, 2022
EleaZhong pushed a commit to EleaZhong/pixray that referenced this issue Feb 26, 2022
EleaZhong pushed a commit to EleaZhong/pixray that referenced this issue Feb 26, 2022
fixes dribnet#10

just some of then endless bookkeeping that
kept me from doing this until now...
EleaZhong pushed a commit to EleaZhong/pixray that referenced this issue Feb 26, 2022
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