-
-
Notifications
You must be signed in to change notification settings - Fork 98
Description
Describe the bug
The random seed buttons in the SDAI app produce seeds in this format:
6687881544318117707
This value is well in excess of the limits of the JavaScript Number type. Thus if these seeds are entered directly in A1111 or likely any other SD web UI, to attempt to replicate the generation from the app in that web UI, the seed value will be rounded off before being sent to the SD server (in the case of my copy of A1111, this seed becomes 6687881544318118000), leading to an entirely different image being generated.
It's actually even the case that if save_images is forced on in the API, while the filename will contain the un-rounded seed, as will the pnginfo (and pnginfo tab of the web ui), the same rounding gets applied to the UI's attempts to display that seed in e.g. the Infinite Image Browsing addon.
To Reproduce
Steps to reproduce the behavior:
- Go to 'txt2img'
- Click on the random seed/dice button
- Run the generation
- Attempt to replicate the generation with the exact same parameters and seed in A1111 webui
- Note that the image is different, and when inspecting pnginfo this is due to a rounded off seed being used in the replication attempt
Expected behavior
Seeds and variation seeds generated by the app should be small enough for generations to be replicated in SD web tools. The normal A1111 random button produces seeds like 1709072778, so that length feels like a good target.
Screenshots
Rounding displayed below. This is not fixable in the web UI itself - they'd have to completely rearchitect how the entire UI handles seeds to use textboxes and BigNum, and every SD web tool everywhere would have to do that.
