Spaces:
Running
on
Zero
Running
on
Zero
update
Browse files
app.py
CHANGED
@@ -98,18 +98,18 @@ def generate_image(
|
|
98 |
ref_task1,
|
99 |
ref_task2,
|
100 |
prompt,
|
101 |
-
width,
|
102 |
-
height,
|
103 |
-
ref_res,
|
104 |
-
num_steps,
|
105 |
-
guidance,
|
106 |
-
seed,
|
107 |
-
true_cfg,
|
108 |
-
cfg_start_step,
|
109 |
-
cfg_end_step,
|
110 |
-
neg_prompt,
|
111 |
-
neg_guidance,
|
112 |
-
first_step_guidance,
|
113 |
):
|
114 |
print(prompt)
|
115 |
ref_conds = []
|
@@ -224,30 +224,38 @@ def create_demo():
|
|
224 |
example_inps = [
|
225 |
[
|
226 |
'example_inputs/woman1.png',
|
|
|
|
|
227 |
'ip',
|
228 |
'profile shot dark photo of a 25-year-old female with smoke escaping from her 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
|
229 |
9180879731249039735,
|
230 |
],
|
231 |
[
|
232 |
'example_inputs/man1.png',
|
|
|
|
|
233 |
'ip',
|
234 |
'a man sitting on the cloud, playing guitar',
|
235 |
1206523688721442817,
|
236 |
],
|
237 |
[
|
238 |
'example_inputs/toy1.png',
|
|
|
|
|
239 |
'ip',
|
240 |
'a purple toy holding a sign saying "DreamO", on the mountain',
|
241 |
1563188099017016129,
|
242 |
],
|
243 |
[
|
244 |
'example_inputs/perfume.png',
|
|
|
|
|
245 |
'ip',
|
246 |
'a perfume under spotlight',
|
247 |
116150031980664704,
|
248 |
],
|
249 |
]
|
250 |
-
gr.Examples(examples=example_inps, inputs=[ref_image1, ref_task1, prompt, seed], label='IP task', cache_examples='lazy',
|
251 |
outputs=[output_image, debug_image, seed_output],
|
252 |
fn=generate_image,)
|
253 |
|
@@ -263,7 +271,7 @@ def create_demo():
|
|
263 |
]
|
264 |
gr.Examples(
|
265 |
examples=example_inps,
|
266 |
-
inputs=[ref_image1, ref_task1, prompt, seed],
|
267 |
label='ID task (similar to PuLID, will only refer to the face)',
|
268 |
cache_examples='lazy',
|
269 |
outputs=[output_image, debug_image, seed_output],
|
@@ -273,18 +281,22 @@ def create_demo():
|
|
273 |
example_inps = [
|
274 |
[
|
275 |
'example_inputs/mickey.png',
|
|
|
276 |
'style',
|
|
|
277 |
'generate a same style image. A rooster wearing overalls.',
|
278 |
6245580464677124951,
|
279 |
],
|
280 |
[
|
281 |
'example_inputs/mountain.png',
|
|
|
282 |
'style',
|
|
|
283 |
'generate a same style image. A pavilion by the river, and the distant mountains are endless',
|
284 |
5248066378927500767,
|
285 |
],
|
286 |
]
|
287 |
-
gr.Examples(examples=example_inps, inputs=[ref_image1, ref_task1, prompt, seed], label='Style task', cache_examples='lazy',
|
288 |
outputs=[output_image, debug_image, seed_output],
|
289 |
fn=generate_image,)
|
290 |
|
|
|
98 |
ref_task1,
|
99 |
ref_task2,
|
100 |
prompt,
|
101 |
+
width=1024,
|
102 |
+
height=1024,
|
103 |
+
ref_res=512,
|
104 |
+
num_steps=12,
|
105 |
+
guidance=3.5,
|
106 |
+
seed='-1',
|
107 |
+
true_cfg=1,
|
108 |
+
cfg_start_step=0,
|
109 |
+
cfg_end_step=0,
|
110 |
+
neg_prompt='',
|
111 |
+
neg_guidance=3.5,
|
112 |
+
first_step_guidance=0,
|
113 |
):
|
114 |
print(prompt)
|
115 |
ref_conds = []
|
|
|
224 |
example_inps = [
|
225 |
[
|
226 |
'example_inputs/woman1.png',
|
227 |
+
None,
|
228 |
+
'ip',
|
229 |
'ip',
|
230 |
'profile shot dark photo of a 25-year-old female with smoke escaping from her 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
|
231 |
9180879731249039735,
|
232 |
],
|
233 |
[
|
234 |
'example_inputs/man1.png',
|
235 |
+
None,
|
236 |
+
'ip',
|
237 |
'ip',
|
238 |
'a man sitting on the cloud, playing guitar',
|
239 |
1206523688721442817,
|
240 |
],
|
241 |
[
|
242 |
'example_inputs/toy1.png',
|
243 |
+
None,
|
244 |
+
'ip',
|
245 |
'ip',
|
246 |
'a purple toy holding a sign saying "DreamO", on the mountain',
|
247 |
1563188099017016129,
|
248 |
],
|
249 |
[
|
250 |
'example_inputs/perfume.png',
|
251 |
+
None,
|
252 |
+
'ip',
|
253 |
'ip',
|
254 |
'a perfume under spotlight',
|
255 |
116150031980664704,
|
256 |
],
|
257 |
]
|
258 |
+
gr.Examples(examples=example_inps, inputs=[ref_image1, ref_image2, ref_task1, ref_task2, prompt, seed], label='IP task', cache_examples='lazy',
|
259 |
outputs=[output_image, debug_image, seed_output],
|
260 |
fn=generate_image,)
|
261 |
|
|
|
271 |
]
|
272 |
gr.Examples(
|
273 |
examples=example_inps,
|
274 |
+
inputs=[ref_image1, ref_image2, ref_task1, ref_task2, prompt, seed],
|
275 |
label='ID task (similar to PuLID, will only refer to the face)',
|
276 |
cache_examples='lazy',
|
277 |
outputs=[output_image, debug_image, seed_output],
|
|
|
281 |
example_inps = [
|
282 |
[
|
283 |
'example_inputs/mickey.png',
|
284 |
+
None,
|
285 |
'style',
|
286 |
+
'ip',
|
287 |
'generate a same style image. A rooster wearing overalls.',
|
288 |
6245580464677124951,
|
289 |
],
|
290 |
[
|
291 |
'example_inputs/mountain.png',
|
292 |
+
None,
|
293 |
'style',
|
294 |
+
'ip',
|
295 |
'generate a same style image. A pavilion by the river, and the distant mountains are endless',
|
296 |
5248066378927500767,
|
297 |
],
|
298 |
]
|
299 |
+
gr.Examples(examples=example_inps, inputs=[ref_image1, ref_image2, ref_task1, ref_task2, prompt, seed], label='Style task', cache_examples='lazy',
|
300 |
outputs=[output_image, debug_image, seed_output],
|
301 |
fn=generate_image,)
|
302 |
|