Spaces:
Runtime error
Runtime error
susunghong
commited on
Commit
•
8f48e7b
1
Parent(s):
3327123
Update app.py
Browse files
app.py
CHANGED
@@ -121,14 +121,14 @@ def main():
|
|
121 |
return [ori_image, sag_image, seed]
|
122 |
|
123 |
def reset():
|
124 |
-
return [0, "Randomize Seed", 90061, 3.0, 0
|
125 |
|
126 |
with gr.Blocks() as demo:
|
127 |
gr.HTML("""<h1 style="font-weight: 900; margin-bottom: 10px;">
|
128 |
Self-Attention Guidance Demo
|
129 |
</h1>
|
130 |
<p>Condition-agnostic diffusion guidance using the internal self-attention by Susung Hong.<p>
|
131 |
-
<p>SAG also produces fine
|
132 |
<a href="https://huggingface.co/spaces/susunghong/Self-Attention-Guidance?duplicate=true">
|
133 |
<img style="margin-top: 0em; margin-bottom: 0em" src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>
|
134 |
""")
|
@@ -157,7 +157,7 @@ def main():
|
|
157 |
label="Text Guidance Scale", minimum=0, maximum=10, value=3.0, step=0.1
|
158 |
)
|
159 |
sag_scale = gr.Slider(
|
160 |
-
label="Self-Attention Guidance Scale", minimum=0, maximum=1.0, value=0
|
161 |
)
|
162 |
|
163 |
with gr.Row():
|
|
|
121 |
return [ori_image, sag_image, seed]
|
122 |
|
123 |
def reset():
|
124 |
+
return [0, "Randomize Seed", 90061, 3.0, 1.0, None, None]
|
125 |
|
126 |
with gr.Blocks() as demo:
|
127 |
gr.HTML("""<h1 style="font-weight: 900; margin-bottom: 10px;">
|
128 |
Self-Attention Guidance Demo
|
129 |
</h1>
|
130 |
<p>Condition-agnostic diffusion guidance using the internal self-attention by Susung Hong.<p>
|
131 |
+
<p>SAG also produces fine <b>unconditional</b> results. Just leave the prompt blank for the unconditional sampling of Stable Diffusion.<p>
|
132 |
<a href="https://huggingface.co/spaces/susunghong/Self-Attention-Guidance?duplicate=true">
|
133 |
<img style="margin-top: 0em; margin-bottom: 0em" src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>
|
134 |
""")
|
|
|
157 |
label="Text Guidance Scale", minimum=0, maximum=10, value=3.0, step=0.1
|
158 |
)
|
159 |
sag_scale = gr.Slider(
|
160 |
+
label="Self-Attention Guidance Scale", minimum=0, maximum=1.0, value=1.0, step=0.05
|
161 |
)
|
162 |
|
163 |
with gr.Row():
|