Skip to content

random seed leakage  #10

Open
Open

Description

@altsoph

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 :)

Activity

  1. dribnet commented on Oct 3, 2021

    @dribnet
    Owner

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

  2. altsoph commented on Oct 3, 2021

    @altsoph
    ContributorAuthor

    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

  3. robinsloan commented on Oct 4, 2021

    @robinsloan

    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.

  4. added 6 commits that reference this issue on Feb 26, 2022
    9039ece
    1379769
    d495b49
    4a28b55
    0f62a12
    0caf1f1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions