Spaces:
Runtime error
Runtime error
Commit
·
34a77d9
1
Parent(s):
94556e7
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,8 +5,8 @@ import torch
|
|
| 5 |
from diffusers import StableDiffusionPipeline
|
| 6 |
from free_lunch_utils import register_free_upblock2d, register_free_crossattn_upblock2d
|
| 7 |
|
| 8 |
-
torch.manual_seed(42)
|
| 9 |
|
|
|
|
| 10 |
model_id = "CompVis/stable-diffusion-v1-4"
|
| 11 |
|
| 12 |
pip_sd = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
|
@@ -90,8 +90,7 @@ h1 {
|
|
| 90 |
}
|
| 91 |
"""
|
| 92 |
|
| 93 |
-
|
| 94 |
-
block = gr.Blocks(css=css)
|
| 95 |
|
| 96 |
options = ['SD1.4', 'SD1.5', 'SD2.1']
|
| 97 |
|
|
@@ -99,6 +98,10 @@ with block:
|
|
| 99 |
gr.Markdown("SD vs. FreeU.")
|
| 100 |
with gr.Group():
|
| 101 |
with gr.Row(elem_id="prompt-container").style(mobile_collapse=False, equal_height=True):
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
with gr.Column():
|
| 103 |
text = gr.Textbox(
|
| 104 |
label="Enter your prompt",
|
|
|
|
| 5 |
from diffusers import StableDiffusionPipeline
|
| 6 |
from free_lunch_utils import register_free_upblock2d, register_free_crossattn_upblock2d
|
| 7 |
|
|
|
|
| 8 |
|
| 9 |
+
torch.manual_seed(42)
|
| 10 |
model_id = "CompVis/stable-diffusion-v1-4"
|
| 11 |
|
| 12 |
pip_sd = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
|
|
|
| 90 |
}
|
| 91 |
"""
|
| 92 |
|
| 93 |
+
block = gr.Blocks(css='style.css')
|
|
|
|
| 94 |
|
| 95 |
options = ['SD1.4', 'SD1.5', 'SD2.1']
|
| 96 |
|
|
|
|
| 98 |
gr.Markdown("SD vs. FreeU.")
|
| 99 |
with gr.Group():
|
| 100 |
with gr.Row(elem_id="prompt-container").style(mobile_collapse=False, equal_height=True):
|
| 101 |
+
|
| 102 |
+
sd_options = gr.Dropdown(options, value='SD1.4', label="SD options")
|
| 103 |
+
model_id = "CompVis/stable-diffusion-v1-4"
|
| 104 |
+
|
| 105 |
with gr.Column():
|
| 106 |
text = gr.Textbox(
|
| 107 |
label="Enter your prompt",
|