From 824bc1cbec410a9e2ee819807883292bdd7a594a Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Mon, 19 Aug 2024 22:36:16 +0200
Subject: [PATCH] Fix buggy seed correction code (broke file numbering on -q >
 1).

---
 stable.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/stable.py b/stable.py
index 2321cde..89ab534 100755
--- 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)
-- 
2.30.2