Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,17 @@ from diffusers import StableDiffusionXLPipeline
|
|
6 |
|
7 |
from scheduling_tcd import TCDScheduler
|
8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
device = "cuda"
|
10 |
base_model_id = "stabilityai/stable-diffusion-xl-base-1.0"
|
11 |
tcd_lora_id = "h1t/TCD-SDXL-LoRA"
|
@@ -36,8 +47,8 @@ def inference(prompt, num_inference_steps=4, seed=-1, eta=0.3):
|
|
36 |
|
37 |
|
38 |
# Define style
|
39 |
-
title = "<h1
|
40 |
-
description = "Official π€ Gradio demo for Trajectory Consistency Distillation"
|
41 |
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/' target='_blank'>Trajectory Consistency Distillation</a> | <a href='https://github.com/jabir-zheng/TCD' target='_blank'>Github Repo</a></p>"
|
42 |
|
43 |
|
@@ -63,7 +74,7 @@ examples = [
|
|
63 |
|
64 |
outputs = gr.Label(label='Generated Images')
|
65 |
|
66 |
-
with gr.Blocks() as demo:
|
67 |
gr.Markdown(f'# {title}\n### {description}')
|
68 |
|
69 |
with gr.Row():
|
@@ -77,7 +88,7 @@ with gr.Blocks() as demo:
|
|
77 |
step=1,
|
78 |
)
|
79 |
|
80 |
-
with gr.Accordion("Advanced Options",
|
81 |
with gr.Row():
|
82 |
with gr.Column():
|
83 |
seed = gr.Number(label="Random Seed", value=-1)
|
|
|
6 |
|
7 |
from scheduling_tcd import TCDScheduler
|
8 |
|
9 |
+
css = """
|
10 |
+
h1 {
|
11 |
+
text-align: center;
|
12 |
+
display:block;
|
13 |
+
}
|
14 |
+
h3 {
|
15 |
+
text-align: center;
|
16 |
+
display:block;
|
17 |
+
}
|
18 |
+
"""
|
19 |
+
|
20 |
device = "cuda"
|
21 |
base_model_id = "stabilityai/stable-diffusion-xl-base-1.0"
|
22 |
tcd_lora_id = "h1t/TCD-SDXL-LoRA"
|
|
|
47 |
|
48 |
|
49 |
# Define style
|
50 |
+
title = "<h1>Trajectory Consistency Distillation</h1>"
|
51 |
+
description = "<h3>Official π€ Gradio demo for Trajectory Consistency Distillation</h3>"
|
52 |
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/' target='_blank'>Trajectory Consistency Distillation</a> | <a href='https://github.com/jabir-zheng/TCD' target='_blank'>Github Repo</a></p>"
|
53 |
|
54 |
|
|
|
74 |
|
75 |
outputs = gr.Label(label='Generated Images')
|
76 |
|
77 |
+
with gr.Blocks(css=css) as demo:
|
78 |
gr.Markdown(f'# {title}\n### {description}')
|
79 |
|
80 |
with gr.Row():
|
|
|
88 |
step=1,
|
89 |
)
|
90 |
|
91 |
+
with gr.Accordion("Advanced Options", open=False):
|
92 |
with gr.Row():
|
93 |
with gr.Column():
|
94 |
seed = gr.Number(label="Random Seed", value=-1)
|