random seed restoring

This commit is contained in:
lvmin
2023-08-17 15:17:32 -07:00
parent 4920341e09
commit db1a49f789
2 changed files with 24 additions and 5 deletions
+7 -2
View File
@@ -54,8 +54,13 @@ def worker():
results = []
seed = image_seed
if not isinstance(seed, int) or seed < 0 or seed > 1024*1024*1024:
seed = random.randint(1, 1024*1024*1024)
max_seed = int(1024*1024*1024)
if not isinstance(seed, int):
seed = random.randint(1, max_seed)
if seed < 0:
seed = - seed
seed = seed % max_seed
all_steps = steps * image_number