Spaces:
Build error
Build error
random seed local
Browse filesSigned-off-by: AnyISalIn <anyisalin@gmail.com>
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":
|