Spaces:
Running
on
Zero
Running
on
Zero
Yjiggfghhjnjj
commited on
Commit
•
8e3d74a
1
Parent(s):
302a450
Update app.py
Browse files
app.py
CHANGED
@@ -100,6 +100,65 @@ with gr.Blocks() as demo:
|
|
100 |
gr.Markdown("## One step SDXL comparison 🦶")
|
101 |
gr.Markdown('Compare SDXL variants and distillations able to generate images in a single diffusion step')
|
102 |
prompt = gr.Textbox(label="Prompt")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
run = gr.Button("Run")
|
104 |
with gr.Row():
|
105 |
with gr.Column():
|
@@ -117,7 +176,7 @@ with gr.Blocks() as demo:
|
|
117 |
with gr.Column():
|
118 |
image_r4 = gr.Image(label="RealVisXL V4")
|
119 |
gr.Markdown("## [RealVisXL V3](https://huggingface.co)")
|
120 |
-
image_outputs = [image_turbo, image_lightning, image_hyper, image_r3,
|
121 |
gr.on(
|
122 |
triggers=[prompt.submit, run.click],
|
123 |
fn=run_comparison,
|
|
|
100 |
gr.Markdown("## One step SDXL comparison 🦶")
|
101 |
gr.Markdown('Compare SDXL variants and distillations able to generate images in a single diffusion step')
|
102 |
prompt = gr.Textbox(label="Prompt")
|
103 |
+
with gr.Accordion("Advanced options", open=False):
|
104 |
+
use_negative_prompt = gr.Checkbox(label="Use negative prompt", value=True)
|
105 |
+
negative_prompt = gr.Text(
|
106 |
+
label="Negative prompt",
|
107 |
+
lines=4,
|
108 |
+
max_lines=6,
|
109 |
+
value="""(deformed, distorted, disfigured:1.3), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, (mutated hands and fingers:1.4), disconnected limbs, mutation, mutated, ugly, disgusting, blurry, amputation, (NSFW:1.25)""",
|
110 |
+
placeholder="Enter a negative prompt",
|
111 |
+
visible=True,
|
112 |
+
)
|
113 |
+
with gr.Row():
|
114 |
+
num_inference_steps = gr.Slider(
|
115 |
+
label="Steps",
|
116 |
+
minimum=10,
|
117 |
+
maximum=60,
|
118 |
+
step=1,
|
119 |
+
value=30,
|
120 |
+
)
|
121 |
+
with gr.Row():
|
122 |
+
num_images_per_prompt = gr.Slider(
|
123 |
+
label="Images",
|
124 |
+
minimum=1,
|
125 |
+
maximum=5,
|
126 |
+
step=1,
|
127 |
+
value=2,
|
128 |
+
)
|
129 |
+
seed = gr.Slider(
|
130 |
+
label="Seed",
|
131 |
+
minimum=0,
|
132 |
+
maximum=MAX_SEED,
|
133 |
+
step=1,
|
134 |
+
value=0,
|
135 |
+
visible=True
|
136 |
+
)
|
137 |
+
randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
|
138 |
+
with gr.Row(visible=True):
|
139 |
+
width = gr.Slider(
|
140 |
+
label="Width",
|
141 |
+
minimum=512,
|
142 |
+
maximum=2048,
|
143 |
+
step=8,
|
144 |
+
value=1024,
|
145 |
+
)
|
146 |
+
height = gr.Slider(
|
147 |
+
label="Height",
|
148 |
+
minimum=512,
|
149 |
+
maximum=2048,
|
150 |
+
step=8,
|
151 |
+
value=1024,
|
152 |
+
)
|
153 |
+
with gr.Row():
|
154 |
+
guidance_scale = gr.Slider(
|
155 |
+
label="Guidance Scale",
|
156 |
+
minimum=0.1,
|
157 |
+
maximum=20.0,
|
158 |
+
step=0.1,
|
159 |
+
value=6,
|
160 |
+
)
|
161 |
+
|
162 |
run = gr.Button("Run")
|
163 |
with gr.Row():
|
164 |
with gr.Column():
|
|
|
176 |
with gr.Column():
|
177 |
image_r4 = gr.Image(label="RealVisXL V4")
|
178 |
gr.Markdown("## [RealVisXL V3](https://huggingface.co)")
|
179 |
+
image_outputs = [image_turbo, image_lightning, image_hyper, image_r3, image_r4]
|
180 |
gr.on(
|
181 |
triggers=[prompt.submit, run.click],
|
182 |
fn=run_comparison,
|