From 19a75d38d79f4c754510c4745440f0c60d89cb78 Mon Sep 17 00:00:00 2001 From: AUTOMATIC <16777216c@gmail.com> Date: Tue, 20 Sep 2022 20:10:01 +0300 Subject: added --use-textbox-seed option to make long seeds possible from web ui --- modules/processing.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/processing.py') diff --git a/modules/processing.py b/modules/processing.py index c9ba6eb3..256e8aae 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -225,8 +225,8 @@ def create_random_tensors(shape, seeds, subseeds=None, subseed_strength=0.0, see def fix_seed(p): - p.seed = int(random.randrange(4294967294)) if p.seed is None or p.seed == -1 else p.seed - p.subseed = int(random.randrange(4294967294)) if p.subseed is None or p.subseed == -1 else p.subseed + p.seed = int(random.randrange(4294967294)) if p.seed is None or p.seed == '' or p.seed == -1 else p.seed + p.subseed = int(random.randrange(4294967294)) if p.subseed is None or p.subseed == '' or p.subseed == -1 else p.subseed def create_infotext(p, all_prompts, all_seeds, all_subseeds, comments, iteration=0, position_in_batch=0): @@ -286,12 +286,12 @@ def process_images(p: StableDiffusionProcessing) -> Processed: if type(p.seed) == list: all_seeds = p.seed else: - all_seeds = [int(p.seed + (x if p.subseed_strength == 0 else 0)) for x in range(len(all_prompts))] + all_seeds = [int(p.seed) + (x if p.subseed_strength == 0 else 0) for x in range(len(all_prompts))] if type(p.subseed) == list: all_subseeds = p.subseed else: - all_subseeds = [int(p.subseed + x) for x in range(len(all_prompts))] + all_subseeds = [int(p.subseed) + x for x in range(len(all_prompts))] def infotext(iteration=0, position_in_batch=0): return create_infotext(p, all_prompts, all_seeds, all_subseeds, comments, iteration, position_in_batch) -- cgit v1.2.3