home · contact · privacy
Once again fix seed correction.
authorChristian Heller <c.heller@plomlompom.de>
Mon, 19 Aug 2024 21:38:49 +0000 (23:38 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Mon, 19 Aug 2024 21:38:49 +0000 (23:38 +0200)
stable.py

index 89ab53487fbeecd7e050bf90176f93d0149d89d6..cdd6667a3df57815b67c6bdb4f74a1d4139f310e 100755 (executable)
--- a/stable.py
+++ b/stable.py
@@ -108,10 +108,11 @@ for n in range(args.quantity):
 maker = ImageMaker(model_path)
 start_seed = args.seed
 start_seed = start_seed if start_seed != 0 else randint(-(2**31-1), 2**31)
+seed_corrector = 0
 for n in range(args.quantity):
-    nth_seed = start_seed + n
-    if 0 == nth_seed:
-        nth_seed += 1
+    if 0 == start_seed + n + seed_corrector:
+        seed_corrector += 1
+    nth_seed = start_seed + n + seed_corrector
     path = save_path(n)
     maker.set_gen_params(args.prompt, nth_seed, args.guidance, args.height,
                          args.width, args.n_steps, args.scheduler)