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

Magic prompt generation produces different results for first run, then consistently produces results for repeated runs #90

Closed
unnamedplugins opened this issue Dec 2, 2022 · 2 comments

Comments

@unnamedplugins
Copy link

unnamedplugins commented Dec 2, 2022

Describe the bug
When running a seed with a magic prompt, the first gen will produce a different image than subsequent gens. This is visible in x/y grids and manual runs.

To Reproduce
Steps to reproduce the behaviour, include the prompt you used if applicable:

  1. Enter a prompt of your choice
  2. Set a static seed
  3. Enable magic prompt with any settings
  4. Generate an image
  5. Generate a second image
  6. Generate a third image
  7. The first image will be very different from the other two images.

Alternative way to reproduce

  1. Set the same settings for dynamic prompts as above
  2. Use the x/y plot script
  3. Set the X axis to "Seed", enter in the same seed at least three times (below I used 1,1,1)
  4. The first image will be very different from subsequent gens, and use a different magic prompt
    image

Also mention which checkboxes have been set.
image

Expected behaviour
The first gen should use the same magic prompt text as the subsequent images.

Additional context
This appears to be something to do with the GPT2 pipeline, but I am unable to identify any workarounds.
I tried:

  1. Initializing the pipeline every call to the script
  2. Pre-running the pipeline with the incoming prompt and throwing the results away (off-by-one)

I first found the issue when doing x/y plots, but determined it could be repeated by manually changing a seed and re-running the same image generation repeatedly. It is able to be reproduced with any batch size and count.

The trigger seems to be closely related to changing the seed.

adieyal added a commit that referenced this issue Dec 3, 2022
@adieyal
Copy link
Owner

adieyal commented Dec 3, 2022

Could you please test 0.29.15 and let me know if it's fixed? I couldn't track down the issue so I'm forcefully setting the random seed in the magic prompt initialiser

@unnamedplugins
Copy link
Author

That appears to have fixed it as far as I can tell. Thanks!

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

2 participants