diff options
Diffstat (limited to 'modules/processing.py')
-rw-r--r-- | modules/processing.py | 8 |
1 files changed, 4 insertions, 4 deletions
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)
|