Update app.py
Browse files
app.py
CHANGED
@@ -94,6 +94,7 @@ pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
|
|
94 |
if device == "cuda":
|
95 |
pipe = pipe.to("cuda")
|
96 |
|
|
|
97 |
|
98 |
def process(input_image, prompt, a_prompt, n_prompt, num_samples, image_resolution, sample_steps, scale, seed, eta, low_threshold, high_threshold):
|
99 |
from PIL import Image
|
@@ -146,8 +147,8 @@ with block:
|
|
146 |
#gr.Markdown("This _example_ was **drive** from <br/><b><h4>[https://github.com/svjack/ControlLoRA-Chinese](https://github.com/svjack/ControlLoRA-Chinese)</h4></b>\n")
|
147 |
with gr.Row():
|
148 |
with gr.Column():
|
149 |
-
input_image = gr.Image(source='upload', type="numpy", value = "
|
150 |
-
prompt = gr.Textbox(label="Prompt", value = "
|
151 |
run_button = gr.Button(label="Run")
|
152 |
with gr.Accordion("Advanced options", open=False):
|
153 |
num_samples = gr.Slider(label="Images", minimum=1, maximum=12, value=1, step=1)
|
@@ -158,7 +159,7 @@ with block:
|
|
158 |
scale = gr.Slider(label="Guidance Scale", minimum=0.1, maximum=30.0, value=9.0, step=0.1)
|
159 |
seed = gr.Slider(label="Seed", minimum=-1, maximum=2147483647, step=1, randomize=True)
|
160 |
eta = gr.Number(label="eta", value=0.0)
|
161 |
-
a_prompt = gr.Textbox(label="Added Prompt", value='
|
162 |
n_prompt = gr.Textbox(label="Negative Prompt",
|
163 |
value='低质量,模糊,混乱')
|
164 |
with gr.Column():
|
|
|
94 |
if device == "cuda":
|
95 |
pipe = pipe.to("cuda")
|
96 |
|
97 |
+
pipe.safety_checker = None
|
98 |
|
99 |
def process(input_image, prompt, a_prompt, n_prompt, num_samples, image_resolution, sample_steps, scale, seed, eta, low_threshold, high_threshold):
|
100 |
from PIL import Image
|
|
|
147 |
#gr.Markdown("This _example_ was **drive** from <br/><b><h4>[https://github.com/svjack/ControlLoRA-Chinese](https://github.com/svjack/ControlLoRA-Chinese)</h4></b>\n")
|
148 |
with gr.Row():
|
149 |
with gr.Column():
|
150 |
+
input_image = gr.Image(source='upload', type="numpy", value = "glass1_small.png")
|
151 |
+
prompt = gr.Textbox(label="Prompt", value = "海边的卡夫卡,秋水共长天一色")
|
152 |
run_button = gr.Button(label="Run")
|
153 |
with gr.Accordion("Advanced options", open=False):
|
154 |
num_samples = gr.Slider(label="Images", minimum=1, maximum=12, value=1, step=1)
|
|
|
159 |
scale = gr.Slider(label="Guidance Scale", minimum=0.1, maximum=30.0, value=9.0, step=0.1)
|
160 |
seed = gr.Slider(label="Seed", minimum=-1, maximum=2147483647, step=1, randomize=True)
|
161 |
eta = gr.Number(label="eta", value=0.0)
|
162 |
+
a_prompt = gr.Textbox(label="Added Prompt", value='')
|
163 |
n_prompt = gr.Textbox(label="Negative Prompt",
|
164 |
value='低质量,模糊,混乱')
|
165 |
with gr.Column():
|