Spaces:
Runtime error
Runtime error
ritwikraha
commited on
Commit
•
1bb8a30
1
Parent(s):
c32a002
chore: fixing gradio components
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
|
|
2 |
import torch
|
3 |
from diffusers import DiffusionPipeline, AutoencoderKL
|
4 |
from PIL import Image
|
5 |
-
import spaces
|
6 |
|
7 |
# Initialize the VAE model and Diffusion Pipeline outside the GPU-enabled function for efficiency
|
8 |
vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
|
@@ -48,12 +48,12 @@ with gr.Blocks() as demo:
|
|
48 |
gr.HTML("<h1><center>Text-to-Image with SDXL-Lightning ⚡</center></h1>")
|
49 |
gr.Markdown(description)
|
50 |
with gr.Group():
|
51 |
-
with gr.
|
52 |
prompt_input = gr.Textbox(label="Enter your image prompt", value="a sketch of TOK khabib pointing at another khabib like the spiderman meme, monchrome, pen sketch", scale=8)
|
53 |
negative_prompt_input = gr.Textbox(label="Enter negative prompt", value="ugly face, multiple bodies, bad anatomy, disfigured, extra fingers", lines=2)
|
54 |
guidance_scale_slider = gr.Slider(label="Guidance Scale", minimum=1, maximum=5, value=3)
|
55 |
steps_slider = gr.Slider(label="Number of Inference Steps", minimum=20, maximum=100, value=50)
|
56 |
-
submit_button = gr.Button("
|
57 |
output_image = gr.Image(label="Generated Sketch")
|
58 |
|
59 |
submit_button.click(
|
|
|
2 |
import torch
|
3 |
from diffusers import DiffusionPipeline, AutoencoderKL
|
4 |
from PIL import Image
|
5 |
+
import spaces
|
6 |
|
7 |
# Initialize the VAE model and Diffusion Pipeline outside the GPU-enabled function for efficiency
|
8 |
vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
|
|
|
48 |
gr.HTML("<h1><center>Text-to-Image with SDXL-Lightning ⚡</center></h1>")
|
49 |
gr.Markdown(description)
|
50 |
with gr.Group():
|
51 |
+
with gr.Column():
|
52 |
prompt_input = gr.Textbox(label="Enter your image prompt", value="a sketch of TOK khabib pointing at another khabib like the spiderman meme, monchrome, pen sketch", scale=8)
|
53 |
negative_prompt_input = gr.Textbox(label="Enter negative prompt", value="ugly face, multiple bodies, bad anatomy, disfigured, extra fingers", lines=2)
|
54 |
guidance_scale_slider = gr.Slider(label="Guidance Scale", minimum=1, maximum=5, value=3)
|
55 |
steps_slider = gr.Slider(label="Number of Inference Steps", minimum=20, maximum=100, value=50)
|
56 |
+
submit_button = gr.Button("Submit")
|
57 |
output_image = gr.Image(label="Generated Sketch")
|
58 |
|
59 |
submit_button.click(
|