Spaces:
Running
on
Zero
Running
on
Zero
SunderAli17
commited on
Commit
•
66b3640
1
Parent(s):
1799bc5
Update app.py
Browse files
app.py
CHANGED
@@ -182,7 +182,7 @@ function refresh() {
|
|
182 |
|
183 |
def create_demo(args, model_name: str, device: str = "cuda" if torch.cuda.is_available() else "cpu",
|
184 |
offload: bool = False):
|
185 |
-
with gr.Blocks(
|
186 |
gr.Markdown(MARKDOWN)
|
187 |
|
188 |
with gr.Row():
|
@@ -215,27 +215,68 @@ def create_demo(args, model_name: str, device: str = "cuda" if torch.cuda.is_ava
|
|
215 |
intermediate_output = gr.Gallery(label='Output', elem_id="gallery", visible=args.dev)
|
216 |
|
217 |
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
|
240 |
generate_btn.click(
|
241 |
fn=generate_image,
|
|
|
182 |
|
183 |
def create_demo(args, model_name: str, device: str = "cuda" if torch.cuda.is_available() else "cpu",
|
184 |
offload: bool = False):
|
185 |
+
with gr.Blocks() as demo:
|
186 |
gr.Markdown(MARKDOWN)
|
187 |
|
188 |
with gr.Row():
|
|
|
215 |
intermediate_output = gr.Gallery(label='Output', elem_id="gallery", visible=args.dev)
|
216 |
|
217 |
|
218 |
+
with gr.Row(), gr.Column():
|
219 |
+
gr.Markdown("## Examples")
|
220 |
+
example_inps = [
|
221 |
+
[
|
222 |
+
'a woman holding sign with glowing green text \"PuLID for FLUX\"',
|
223 |
+
'sample_img/image1.png',
|
224 |
+
4, 4, 2680261499100305976, 1
|
225 |
+
],
|
226 |
+
[
|
227 |
+
'portrait, side view',
|
228 |
+
'sample_img/image1.png',
|
229 |
+
4, 4, 1205240166692517553, 1
|
230 |
+
],
|
231 |
+
[
|
232 |
+
'white-haired woman with vr technology atmosphere, revolutionary exceptional magnum with remarkable details', # noqa E501
|
233 |
+
'sample_img/image1.png',
|
234 |
+
4, 4, 6349424134217931066, 1
|
235 |
+
],
|
236 |
+
[
|
237 |
+
'a young child is eating Icecream',
|
238 |
+
'sample_img/image1.png',
|
239 |
+
4, 4, 10606046113565776207, 1
|
240 |
+
],
|
241 |
+
[
|
242 |
+
'a man is holding a sign with text \"PuLID for FLUX\", winter, snowing, top of the mountain',
|
243 |
+
'sample_img/test1.jpg',
|
244 |
+
4, 4, 2410129802683836089, 1
|
245 |
+
],
|
246 |
+
[
|
247 |
+
'portrait, candle light',
|
248 |
+
'sample_img/test1.jpg',
|
249 |
+
4, 4, 17522759474323955700, 1
|
250 |
+
],
|
251 |
+
[
|
252 |
+
'profile shot dark photo of a 25-year-old male with smoke escaping from his mouth, the backlit smoke gives the image an ephemeral quality, natural face, natural eyebrows, natural skin texture, award winning photo, highly detailed face, atmospheric lighting, film grain, monochrome', # noqa E501
|
253 |
+
'sample_img/test1.jpg',
|
254 |
+
4, 4, 17733156847328193625, 1
|
255 |
+
],
|
256 |
+
[
|
257 |
+
'American Comics, 1boy',
|
258 |
+
'sample_img/test1.jpg',
|
259 |
+
1, 4, 13223174453874179686, 1
|
260 |
+
],
|
261 |
+
[
|
262 |
+
'portrait, pixar',
|
263 |
+
'sample_img/test1.jpg',
|
264 |
+
1, 4, 9445036702517583939, 1
|
265 |
+
],
|
266 |
+
]
|
267 |
+
gr.Examples(examples=example_inps, inputs=[prompt, id_image, start_step, guidance, seed, true_cfg],
|
268 |
+
label='fake CFG')
|
269 |
+
|
270 |
+
example_inps = [
|
271 |
+
[
|
272 |
+
'portrait, made of ice sculpture',
|
273 |
+
'sample_img/test1.jpg',
|
274 |
+
1, 1, 3811899118709451814, 5
|
275 |
+
],
|
276 |
+
]
|
277 |
+
gr.Examples(examples=example_inps, inputs=[prompt, id_image, start_step, guidance, seed, true_cfg],
|
278 |
+
label='true CFG')
|
279 |
+
|
280 |
|
281 |
generate_btn.click(
|
282 |
fn=generate_image,
|