From 6497a5dfbb91be5bd031832656943eac2428d7bd Mon Sep 17 00:00:00 2001 From: Valentin Roussellet Date: Wed, 20 Nov 2024 15:21:52 -0800 Subject: [PATCH] Pass seed to sd img2img (#1114) --- stable_diffusion/image2image.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stable_diffusion/image2image.py b/stable_diffusion/image2image.py index e470aa81..a037af6a 100644 --- a/stable_diffusion/image2image.py +++ b/stable_diffusion/image2image.py @@ -30,6 +30,7 @@ if __name__ == "__main__": parser.add_argument("--preload-models", action="store_true") parser.add_argument("--output", default="out.png") parser.add_argument("--verbose", "-v", action="store_true") + parser.add_argument("--seed", type=int) args = parser.parse_args() # Load the models @@ -94,6 +95,7 @@ if __name__ == "__main__": cfg_weight=args.cfg, num_steps=args.steps, negative_text=args.negative_prompt, + seed=args.seed ) for x_t in tqdm(latents, total=int(args.steps * args.strength)): mx.eval(x_t)