Spaces:
Running
on
Zero
Running
on
Zero
zhiweili
commited on
Commit
•
386a133
1
Parent(s):
8ae56d4
update default value
Browse files- app_img2img.py +2 -2
app_img2img.py
CHANGED
@@ -15,7 +15,7 @@ from diffusers import (
|
|
15 |
BASE_MODEL = "stabilityai/stable-diffusion-xl-base-1.0"
|
16 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
17 |
|
18 |
-
DEFAULT_EDIT_PROMPT = "a beautiful
|
19 |
DEFAULT_NEGATIVE_PROMPT = "nude, nudity, nsfw, nipple, Bare-chested, palm hand, hands, fingers, deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, text, close up, cropped, out of frame, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, cloned face, disfigured"
|
20 |
|
21 |
DEFAULT_CATEGORY = "face"
|
@@ -76,7 +76,7 @@ def create_demo() -> gr.Blocks:
|
|
76 |
category = gr.Textbox(label="Category", value=DEFAULT_CATEGORY, visible=False)
|
77 |
with gr.Column():
|
78 |
num_steps = gr.Slider(minimum=1, maximum=100, value=30, step=1, label="Num Steps")
|
79 |
-
guidance_scale = gr.Slider(minimum=0, maximum=30, value=
|
80 |
mask_expansion = gr.Number(label="Mask Expansion", value=300, visible=False)
|
81 |
with gr.Column():
|
82 |
mask_dilation = gr.Slider(minimum=0, maximum=10, value=2, step=1, label="Mask Dilation")
|
|
|
15 |
BASE_MODEL = "stabilityai/stable-diffusion-xl-base-1.0"
|
16 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
17 |
|
18 |
+
DEFAULT_EDIT_PROMPT = "a beautiful woman with a hollywood style face"
|
19 |
DEFAULT_NEGATIVE_PROMPT = "nude, nudity, nsfw, nipple, Bare-chested, palm hand, hands, fingers, deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, text, close up, cropped, out of frame, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, cloned face, disfigured"
|
20 |
|
21 |
DEFAULT_CATEGORY = "face"
|
|
|
76 |
category = gr.Textbox(label="Category", value=DEFAULT_CATEGORY, visible=False)
|
77 |
with gr.Column():
|
78 |
num_steps = gr.Slider(minimum=1, maximum=100, value=30, step=1, label="Num Steps")
|
79 |
+
guidance_scale = gr.Slider(minimum=0, maximum=30, value=5, step=0.5, label="Guidance Scale")
|
80 |
mask_expansion = gr.Number(label="Mask Expansion", value=300, visible=False)
|
81 |
with gr.Column():
|
82 |
mask_dilation = gr.Slider(minimum=0, maximum=10, value=2, step=1, label="Mask Dilation")
|