Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,7 +2,7 @@ from diffusers import StableDiffusionPipeline
|
|
| 2 |
import gradio as gr
|
| 3 |
import torch
|
| 4 |
|
| 5 |
-
device = "
|
| 6 |
|
| 7 |
pipe = StableDiffusionPipeline.from_pretrained("nitrosocke/Arcane-Diffusion", torch_dtype=torch.float16)
|
| 8 |
if torch.cuda.is_available():
|
|
@@ -45,7 +45,7 @@ with gr.Blocks() as demo:
|
|
| 45 |
run = gr.Button(value="Run")
|
| 46 |
gr.Markdown(f"Running on: {device}")
|
| 47 |
with gr.Column():
|
| 48 |
-
gallery = gr.Gallery()
|
| 49 |
|
| 50 |
run.click(inference, inputs=[prompt, guidance, steps], outputs=gallery)
|
| 51 |
gr.Examples([
|
|
|
|
| 2 |
import gradio as gr
|
| 3 |
import torch
|
| 4 |
|
| 5 |
+
device = "GPU 🔥" if torch.cuda.is_available() else "CPU 🥶"
|
| 6 |
|
| 7 |
pipe = StableDiffusionPipeline.from_pretrained("nitrosocke/Arcane-Diffusion", torch_dtype=torch.float16)
|
| 8 |
if torch.cuda.is_available():
|
|
|
|
| 45 |
run = gr.Button(value="Run")
|
| 46 |
gr.Markdown(f"Running on: {device}")
|
| 47 |
with gr.Column():
|
| 48 |
+
gallery = gr.Gallery(height=512)
|
| 49 |
|
| 50 |
run.click(inference, inputs=[prompt, guidance, steps], outputs=gallery)
|
| 51 |
gr.Examples([
|