InvokeAI: [bug]: Max seed value is too low

Is there an existing issue for this?

  • I have searched the existing issues

OS

Windows

GPU

cuda

VRAM

8GB

What happened?

There are plenty of prompts all over the internet with seeds much higher than what InvokeAI allows.

E.g., I tried this one:

  • 112358132141

It was truncated to:

  • 4294967295

Up-arrow icon next to the field is greyed out indicating limit is reached. It seems, the issue appears with any sampler.

Screenshots

screenshot

Additional context

No response

Contact Details

No response

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 3
  • Comments: 15 (2 by maintainers)

Most upvoted comments

The goal isn’t to allow a user input anything, but to be able to re-generate other people’s examples. So I guess, for now you should at least raise it to 9007199254740992 as a simple fix.

But in the future - yeah, I strongly believe generated images shouldn’t be different depending on which UI you used to make them. So, yeah, the true solution is unfortunately “follow A11 since he sets the trend”.

The main difference in the results is because of how each implementation handles the attention system. As long as that is not standardized, they will all end up having different results. Maybe some day we’ll have a library that is so state of the art that everyone uses that and we get some sort of standardization but I don’t think that’s happening any time soon. The seed value is the smallest concern in that regard.

The goal isn’t to allow a user input anything, but to be able to re-generate other people’s examples. So I guess, for now you should at least raise it to 9007199254740992 as a simple fix.

But in the future - yeah, I strongly believe generated images shouldn’t be different depending on which UI you used to make them. So, yeah, the true solution is unfortunately “follow A11 since he sets the trend”.

In AUTOMATIC1111, I’ve tried to detect it from trial end error, with bicection. Here are my findings:

  • The field itself seems to be unlimited in size and don’t have any restrictions at all. It’s not even a number field, you can input strings there.
  • But it behaves differently depending on what you’ve provided:
    • a regular int or a float are both treated as a float
    • if you put any character stopping it to be a number, it seems to be treated as a stricng, which is internally hashed in some way to produce the actual, “raw” seed.
  • The max raw seed value is 18446744073709519872, i.e. 2^64
  • HOWEVER, all the generations starting from 18446744073709517824 (2^64-2048) give almost the same result. As well as 2048 seeds before them (with another image, of course), As well as 2048 before them…
    • This behavior doesn’t seem to depend on a model being used.
    • And it also hints that floats are used even if seed is provided as an int.

So, with these findings:

  • I believe, the best solution would be to replecate the same seed treatment as in A11’s webui.
  • If you don’t agree, you should at least raise the max value to 18446744073709519872.