Spaces:
Runtime error
Runtime error
Your Name
commited on
Commit
•
a4f22dc
1
Parent(s):
70c1c3c
css edit
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ import os
|
|
11 |
import requests
|
12 |
|
13 |
|
14 |
-
model_id = "CompVis/stable-diffusion
|
15 |
device = "cuda"
|
16 |
|
17 |
#If you are running this code locally, you need to either do a 'huggingface-cli login` or paste your User Access Token from here https://huggingface.co/settings/tokens into the use_auth_token field below.
|
@@ -227,53 +227,11 @@ with block:
|
|
227 |
font-size: 1.75rem;
|
228 |
"
|
229 |
>
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
viewBox="0 0 115 115"
|
234 |
-
fill="none"
|
235 |
-
xmlns="http://www.w3.org/2000/svg"
|
236 |
-
>
|
237 |
-
<rect width="23" height="23" fill="white"></rect>
|
238 |
-
<rect y="69" width="23" height="23" fill="white"></rect>
|
239 |
-
<rect x="23" width="23" height="23" fill="#AEAEAE"></rect>
|
240 |
-
<rect x="23" y="69" width="23" height="23" fill="#AEAEAE"></rect>
|
241 |
-
<rect x="46" width="23" height="23" fill="white"></rect>
|
242 |
-
<rect x="46" y="69" width="23" height="23" fill="white"></rect>
|
243 |
-
<rect x="69" width="23" height="23" fill="black"></rect>
|
244 |
-
<rect x="69" y="69" width="23" height="23" fill="black"></rect>
|
245 |
-
<rect x="92" width="23" height="23" fill="#D9D9D9"></rect>
|
246 |
-
<rect x="92" y="69" width="23" height="23" fill="#AEAEAE"></rect>
|
247 |
-
<rect x="115" y="46" width="23" height="23" fill="white"></rect>
|
248 |
-
<rect x="115" y="115" width="23" height="23" fill="white"></rect>
|
249 |
-
<rect x="115" y="69" width="23" height="23" fill="#D9D9D9"></rect>
|
250 |
-
<rect x="92" y="46" width="23" height="23" fill="#AEAEAE"></rect>
|
251 |
-
<rect x="92" y="115" width="23" height="23" fill="#AEAEAE"></rect>
|
252 |
-
<rect x="92" y="69" width="23" height="23" fill="white"></rect>
|
253 |
-
<rect x="69" y="46" width="23" height="23" fill="white"></rect>
|
254 |
-
<rect x="69" y="115" width="23" height="23" fill="white"></rect>
|
255 |
-
<rect x="69" y="69" width="23" height="23" fill="#D9D9D9"></rect>
|
256 |
-
<rect x="46" y="46" width="23" height="23" fill="black"></rect>
|
257 |
-
<rect x="46" y="115" width="23" height="23" fill="black"></rect>
|
258 |
-
<rect x="46" y="69" width="23" height="23" fill="black"></rect>
|
259 |
-
<rect x="23" y="46" width="23" height="23" fill="#D9D9D9"></rect>
|
260 |
-
<rect x="23" y="115" width="23" height="23" fill="#AEAEAE"></rect>
|
261 |
-
<rect x="23" y="69" width="23" height="23" fill="black"></rect>
|
262 |
-
</svg>
|
263 |
-
<h1 style="font-weight: 900; margin-bottom: 7px;">
|
264 |
-
Stable Diffusion Demo
|
265 |
</h1>
|
266 |
</div>
|
267 |
-
<p style="margin-bottom: 10px; font-size: 94%">
|
268 |
-
Stable Diffusion is a state of the art text-to-image model that generates
|
269 |
-
images from text.<br>For faster generation and API
|
270 |
-
access you can try
|
271 |
-
<a
|
272 |
-
href="http://beta.dreamstudio.ai/"
|
273 |
-
style="text-decoration: underline;"
|
274 |
-
target="_blank"
|
275 |
-
>DreamStudio Beta</a
|
276 |
-
>
|
277 |
</p>
|
278 |
</div>
|
279 |
"""
|
@@ -338,18 +296,8 @@ with block:
|
|
338 |
)
|
339 |
|
340 |
gr.HTML(
|
341 |
-
|
342 |
-
|
343 |
-
<p>Model by <a href="https://huggingface.co/CompVis" style="text-decoration: underline;" target="_blank">CompVis</a> and <a href="https://huggingface.co/stabilityai" style="text-decoration: underline;" target="_blank">Stability AI</a> - backend running JAX on TPUs due to generous support of <a href="https://sites.research.google/trc/about/" style="text-decoration: underline;" target="_blank">Google TRC program</a> - Gradio Demo by 🤗 Hugging Face
|
344 |
-
</p>
|
345 |
-
</div>
|
346 |
-
<div class="acknowledgments">
|
347 |
-
<p><h4>LICENSE</h4>
|
348 |
-
The model is licensed with a <a href="https://huggingface.co/spaces/CompVis/stable-diffusion-license" style="text-decoration: underline;" target="_blank">CreativeML Open RAIL-M</a> license. The authors claim no rights on the outputs you generate, you are free to use them and are accountable for their use which must not go against the provisions set in this license. The license forbids you from sharing any content that violates any laws, produce any harm to a person, disseminate any personal information that would be meant for harm, spread misinformation and target vulnerable groups. For the full list of restrictions please <a href="https://huggingface.co/spaces/CompVis/stable-diffusion-license" target="_blank" style="text-decoration: underline;" target="_blank">read the license</a></p>
|
349 |
-
<p><h4>Biases and content acknowledgment</h4>
|
350 |
-
Despite how impressive being able to turn text into image is, beware to the fact that this model may output content that reinforces or exacerbates societal biases, as well as realistic faces, pornography and violence. The model was trained on the <a href="https://laion.ai/blog/laion-5b/" style="text-decoration: underline;" target="_blank">LAION-5B dataset</a>, which scraped non-curated image-text-pairs from the internet (the exception being the removal of illegal content) and is meant for research purposes. You can read more in the <a href="https://huggingface.co/CompVis/stable-diffusion-v1-4" style="text-decoration: underline;" target="_blank">model card</a></p>
|
351 |
-
</div>
|
352 |
-
"""
|
353 |
)
|
354 |
|
355 |
block.queue(concurrency_count=40, max_size=20).launch(max_threads=150)
|
|
|
11 |
import requests
|
12 |
|
13 |
|
14 |
+
model_id = "CompVis/stable-diffusion"
|
15 |
device = "cuda"
|
16 |
|
17 |
#If you are running this code locally, you need to either do a 'huggingface-cli login` or paste your User Access Token from here https://huggingface.co/settings/tokens into the use_auth_token field below.
|
|
|
227 |
font-size: 1.75rem;
|
228 |
"
|
229 |
>
|
230 |
+
<h1 style="font-weight: 900; margin-bottom: 7px;">
|
231 |
+
</h1>
|
232 |
+
Se-ret AI Art Generator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
</h1>
|
234 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
235 |
</p>
|
236 |
</div>
|
237 |
"""
|
|
|
296 |
)
|
297 |
|
298 |
gr.HTML(
|
299 |
+
|
300 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
301 |
)
|
302 |
|
303 |
block.queue(concurrency_count=40, max_size=20).launch(max_threads=150)
|