Spaces:
Runtime error
Runtime error
hadisalman
commited on
Commit
•
a03c662
1
Parent(s):
b8d132b
update instructions
Browse files
app.py
CHANGED
@@ -166,9 +166,9 @@ with gr.Blocks() as demo:
|
|
166 |
imgmask = gr.ImageMask(label='Drawing tool to mask regions you want to keep, e.g. faces')
|
167 |
prompt = gr.Textbox(label='Prompt', placeholder='A photo of a man in a wedding')
|
168 |
seed = gr.Textbox(label='Seed (Change to get different edits)', placeholder=str(DEFAULT_SEED), visible=True)
|
169 |
-
with gr.Accordion("Advanced
|
170 |
-
scale = gr.Slider(label="Guidance
|
171 |
-
num_steps = gr.Slider(label="Number of
|
172 |
immunize = gr.Checkbox(label='Immunize', value=False)
|
173 |
b1 = gr.Button('Submit')
|
174 |
with gr.Column():
|
@@ -176,8 +176,10 @@ with gr.Blocks() as demo:
|
|
176 |
show_label=False,
|
177 |
elem_id="gallery").style(grid=[1,2], height="auto")
|
178 |
duplicate = gr.HTML("""
|
179 |
-
<p>For faster inference without waiting in queue,
|
180 |
<br/>
|
|
|
|
|
181 |
<a href="https://huggingface.co/spaces/hadisalman/photoguard?duplicate=true">
|
182 |
<img style="margin-top: 0em; margin-bottom: 0em" src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>
|
183 |
<p/>
|
|
|
166 |
imgmask = gr.ImageMask(label='Drawing tool to mask regions you want to keep, e.g. faces')
|
167 |
prompt = gr.Textbox(label='Prompt', placeholder='A photo of a man in a wedding')
|
168 |
seed = gr.Textbox(label='Seed (Change to get different edits)', placeholder=str(DEFAULT_SEED), visible=True)
|
169 |
+
with gr.Accordion("Advanced options (to improve quality of edits)", open=False):
|
170 |
+
scale = gr.Slider(label="Guidance scale", minimum=0.1, maximum=25.0, value=GUIDANCE_SCALE, step=0.1)
|
171 |
+
num_steps = gr.Slider(label="Number of inference steps (higher better, but slower)", minimum=10, maximum=250, value=NUM_INFERENCE_STEPS, step=5)
|
172 |
immunize = gr.Checkbox(label='Immunize', value=False)
|
173 |
b1 = gr.Button('Submit')
|
174 |
with gr.Column():
|
|
|
176 |
show_label=False,
|
177 |
elem_id="gallery").style(grid=[1,2], height="auto")
|
178 |
duplicate = gr.HTML("""
|
179 |
+
<p>For faster inference without waiting in queue, run this demo locally (instruction in our Github repo), or duplicate this space and upgrade to GPU in settings.
|
180 |
<br/>
|
181 |
+
<a href="https://github.com/MadryLab/photoguard">
|
182 |
+
<img style="margin-top: 0em; margin-bottom: 0em" src="https://badgen.net/badge/icon/GitHub?icon=github&label"></a>
|
183 |
<a href="https://huggingface.co/spaces/hadisalman/photoguard?duplicate=true">
|
184 |
<img style="margin-top: 0em; margin-bottom: 0em" src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>
|
185 |
<p/>
|