Spaces:
Runtime error
Runtime error
patrickvonplaten
commited on
Commit
·
4ea4bee
1
Parent(s):
ae7103b
Update app.py
Browse files
app.py
CHANGED
@@ -36,8 +36,8 @@ def inference(
|
|
36 |
image,
|
37 |
steps,
|
38 |
neg_prompt="",
|
39 |
-
width=
|
40 |
-
height=
|
41 |
seed=0,
|
42 |
):
|
43 |
print(psutil.virtual_memory()) # print memory usage
|
@@ -79,10 +79,10 @@ with gr.Blocks(css="style.css") as demo:
|
|
79 |
f"""
|
80 |
<div class="finetuned-diffusion-div">
|
81 |
<div>
|
82 |
-
<h1>
|
83 |
</div>
|
84 |
<p>
|
85 |
-
Demo for
|
86 |
</p>
|
87 |
<p>
|
88 |
Running on <b>{device}</b>
|
@@ -185,25 +185,13 @@ with gr.Blocks(css="style.css") as demo:
|
|
185 |
generate.click(inference, inputs=inputs, outputs=outputs)
|
186 |
|
187 |
ex = gr.Examples(
|
188 |
-
[],
|
189 |
inputs=[prompt, text_guidance_scale, image_guidance_scale, image, steps],
|
190 |
outputs=outputs,
|
191 |
fn=inference,
|
192 |
cache_examples=True,
|
193 |
)
|
194 |
|
195 |
-
gr.HTML(
|
196 |
-
"""
|
197 |
-
<div style="border-top: 1px solid #303030;">
|
198 |
-
<br>
|
199 |
-
<p>Models by <a href="https://huggingface.co/darkstorm2150">@darkstorm2150</a> and others. ❤️</p>
|
200 |
-
<p>This space uses the <a href="https://github.com/LuChengTHU/dpm-solver">DPM-Solver++</a> sampler by <a href="https://arxiv.org/abs/2206.00927">Cheng Lu, et al.</a>.</p>
|
201 |
-
<p>Space by: Darkstorm (Victor Espinoza)<br>
|
202 |
-
<a href="https://www.instagram.com/officialvictorespinoza/">Instagram</a>
|
203 |
-
</div>
|
204 |
-
"""
|
205 |
-
)
|
206 |
-
|
207 |
print(f"Space built in {time.time() - start_time:.2f} seconds")
|
208 |
|
209 |
demo.queue(concurrency_count=1)
|
|
|
36 |
image,
|
37 |
steps,
|
38 |
neg_prompt="",
|
39 |
+
width=512,
|
40 |
+
height=512,
|
41 |
seed=0,
|
42 |
):
|
43 |
print(psutil.virtual_memory()) # print memory usage
|
|
|
79 |
f"""
|
80 |
<div class="finetuned-diffusion-div">
|
81 |
<div>
|
82 |
+
<h1>Instruct-Pix2Pix Diffusion</h1>
|
83 |
</div>
|
84 |
<p>
|
85 |
+
Demo for Instruct-Pix2Pix Diffusion
|
86 |
</p>
|
87 |
<p>
|
88 |
Running on <b>{device}</b>
|
|
|
185 |
generate.click(inference, inputs=inputs, outputs=outputs)
|
186 |
|
187 |
ex = gr.Examples(
|
188 |
+
["turn him into a cyborg", 7.5, 1.2, "./statue.jpg", 20],
|
189 |
inputs=[prompt, text_guidance_scale, image_guidance_scale, image, steps],
|
190 |
outputs=outputs,
|
191 |
fn=inference,
|
192 |
cache_examples=True,
|
193 |
)
|
194 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
print(f"Space built in {time.time() - start_time:.2f} seconds")
|
196 |
|
197 |
demo.queue(concurrency_count=1)
|