anyisalin commited on
Commit
c8d82c9
·
1 Parent(s): abf2378

random seed local

Browse files

Signed-off-by: AnyISalIn <anyisalin@gmail.com>

Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -1,6 +1,7 @@
1
  import gradio as gr
2
  from novita_client import *
3
  import logging
 
4
  import traceback
5
 
6
 
@@ -357,6 +358,11 @@ def create_ui():
357
  height = int(style_hegiht)
358
  width = int(style_width)
359
 
 
 
 
 
 
360
  style_prompt = f"{first_stage_activication_words} {style_gender}, <lora:{style_lora}:{first_stage_lora_scale}>, {style_prompt}"
361
 
362
  if style_method == "txt2img":
 
1
  import gradio as gr
2
  from novita_client import *
3
  import logging
4
+ import random
5
  import traceback
6
 
7
 
 
358
  height = int(style_hegiht)
359
  width = int(style_width)
360
 
361
+ if first_stage_seed == -1:
362
+ first_stage_seed = random.randint(1, 2 ** 32 - 1)
363
+ if second_stage_seed == -1:
364
+ second_stage_seed = random.randint(1, 2 ** 32 - 1)
365
+
366
  style_prompt = f"{first_stage_activication_words} {style_gender}, <lora:{style_lora}:{first_stage_lora_scale}>, {style_prompt}"
367
 
368
  if style_method == "txt2img":