Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -135,10 +135,7 @@ with gr.Blocks(css=css) as demo:
|
|
135 |
init_image_state = gr.State()
|
136 |
with gr.Column(elem_id="container"):
|
137 |
gr.Markdown(
|
138 |
-
"""
|
139 |
-
## Unofficial Demo
|
140 |
-
SDXL Turbo model can generate high quality images in a single pass read more on [stability.ai post](https://stability.ai/news/stability-ai-sdxl-turbo).
|
141 |
-
**Model**: https://huggingface.co/stabilityai/sdxl-turbo
|
142 |
""",
|
143 |
elem_id="intro",
|
144 |
)
|
@@ -177,29 +174,7 @@ with gr.Blocks(css=css) as demo:
|
|
177 |
step=1,
|
178 |
)
|
179 |
|
180 |
-
|
181 |
-
gr.Markdown(
|
182 |
-
"""## Running SDXL Turbo with `diffusers`
|
183 |
-
```bash
|
184 |
-
pip install diffusers==0.23.1
|
185 |
-
```
|
186 |
-
```py
|
187 |
-
from diffusers import DiffusionPipeline
|
188 |
-
|
189 |
-
pipe = DiffusionPipeline.from_pretrained(
|
190 |
-
"stabilityai/sdxl-turbo"
|
191 |
-
).to("cuda")
|
192 |
-
results = pipe(
|
193 |
-
prompt="A cinematic shot of a baby racoon wearing an intricate italian priest robe",
|
194 |
-
num_inference_steps=1,
|
195 |
-
guidance_scale=0.0,
|
196 |
-
)
|
197 |
-
imga = results.images[0]
|
198 |
-
imga.save("image.png")
|
199 |
-
```
|
200 |
-
"""
|
201 |
-
)
|
202 |
-
|
203 |
inputs = [image_input, prompt, strength, steps, seed]
|
204 |
generate_bt.click(fn=predict, inputs=inputs, outputs=image, show_progress=False)
|
205 |
prompt.change(fn=predict, inputs=inputs, outputs=image, show_progress=False)
|
|
|
135 |
init_image_state = gr.State()
|
136 |
with gr.Column(elem_id="container"):
|
137 |
gr.Markdown(
|
138 |
+
"""
|
|
|
|
|
|
|
139 |
""",
|
140 |
elem_id="intro",
|
141 |
)
|
|
|
174 |
step=1,
|
175 |
)
|
176 |
|
177 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
inputs = [image_input, prompt, strength, steps, seed]
|
179 |
generate_bt.click(fn=predict, inputs=inputs, outputs=image, show_progress=False)
|
180 |
prompt.change(fn=predict, inputs=inputs, outputs=image, show_progress=False)
|