Spaces:
Runtime error
Runtime error
zwl
commited on
Commit
·
0b4f323
1
Parent(s):
1e5c8e6
add negative prompt
Browse files
app.py
CHANGED
@@ -114,7 +114,7 @@ def img_to_img(model_path, prompt, neg_prompt, img, strength, guidance, steps, w
|
|
114 |
img = img.resize((int(img.width * ratio), int(img.height * ratio)), Image.LANCZOS)
|
115 |
result = pipe(
|
116 |
prompt,
|
117 |
-
|
118 |
# num_images_per_prompt=n_images,
|
119 |
init_image = img,
|
120 |
num_inference_steps = int(steps),
|
@@ -223,8 +223,8 @@ with gr.Blocks(css=css) as demo:
|
|
223 |
with gr.Column(scale=45):
|
224 |
with gr.Tab("Options"):
|
225 |
with gr.Group():
|
226 |
-
|
227 |
-
neg_prompt = ""
|
228 |
|
229 |
# n_images = gr.Slider(label="Images", value=1, minimum=1, maximum=4, step=1)
|
230 |
|
|
|
114 |
img = img.resize((int(img.width * ratio), int(img.height * ratio)), Image.LANCZOS)
|
115 |
result = pipe(
|
116 |
prompt,
|
117 |
+
negative_prompt = neg_prompt,
|
118 |
# num_images_per_prompt=n_images,
|
119 |
init_image = img,
|
120 |
num_inference_steps = int(steps),
|
|
|
223 |
with gr.Column(scale=45):
|
224 |
with gr.Tab("Options"):
|
225 |
with gr.Group():
|
226 |
+
neg_prompt = gr.Textbox(label="Negative prompt", placeholder="What to exclude from the image")
|
227 |
+
# neg_prompt = ""
|
228 |
|
229 |
# n_images = gr.Slider(label="Images", value=1, minimum=1, maximum=4, step=1)
|
230 |
|