How to print out the seed used #41

by Aporetic - opened

I have commented out the line of code within, "torch.manual_seed(42)" to manually set the seed.
Thus, seeds are randomized. After doing this, is there some way to print out the seed that's used for a prompt to the console,
or any other means of determining which seed a generated image used?

Instead of removing the line in, "torch.manual_seed(42)" to manually set the seed, I simply input a random number into the manual_seed as detailed in the reddit post below:
After importing random, you can simply replace the "torch.manual_seed(42)" with the following three lines of code to use then print out a random seed value:
print("Seed value: ", seedValue)

note: 4294967295 is used as it is reportedly the upper bound of Stable Diffusion's seed value. However, I have tested the value 4294967296 (one higher than previous) which works fine, so I am unsure.