home · contact · privacy
Fix buggy seed correction code (broke file numbering on -q > 1).
authorChristian Heller <c.heller@plomlompom.de>
Mon, 19 Aug 2024 20:36:16 +0000 (22:36 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Mon, 19 Aug 2024 20:36:16 +0000 (22:36 +0200)
stable.py

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