Update app.py
Browse files
app.py
CHANGED
@@ -206,79 +206,79 @@ with gr.Blocks(theme=gr.themes.Origin(),css=css) as demo:
|
|
206 |
run_button = gr.Button("Run", scale=0, variant="primary")
|
207 |
result = gr.Image(label="Result", show_label=False)
|
208 |
with gr.Accordion("Advanced Settings", open=True):
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
241 |
)
|
242 |
-
latent_file_5 = gr.File(label="Image Prompt 5 (Optional)")
|
243 |
-
file_5_strength = gr.Slider(
|
244 |
-
label="Img 5 %",
|
245 |
-
minimum=0.0,
|
246 |
-
maximum=16.0,
|
247 |
-
step=0.01,
|
248 |
-
value=1.0,
|
249 |
-
)
|
250 |
-
image_encoder_path = gr.Dropdown(
|
251 |
-
["google/siglip-so400m-patch14-384", "laion/CLIP-ViT-H-14-laion2B-s32B-b79K"],
|
252 |
-
label="CLIP Model",
|
253 |
-
)
|
254 |
-
ip_scale = gr.Slider(
|
255 |
-
label="Image Prompt Scale",
|
256 |
-
minimum=0.0,
|
257 |
-
maximum=2.0,
|
258 |
-
step=0.01,
|
259 |
-
value=0.5,
|
260 |
-
)
|
261 |
-
negative_prompt_1 = gr.Text(
|
262 |
-
label="Negative prompt 1",
|
263 |
-
max_lines=1,
|
264 |
-
placeholder="Enter a negative prompt",
|
265 |
-
visible=True,
|
266 |
-
value="bad anatomy, poorly drawn hands, distorted face, blurry, out of frame, low resolution, grainy, pixelated, disfigured, mutated, extra limbs, bad composition"
|
267 |
-
)
|
268 |
-
negative_prompt_2 = gr.Text(
|
269 |
-
label="Negative prompt 2",
|
270 |
-
max_lines=1,
|
271 |
-
placeholder="Enter a second negative prompt",
|
272 |
-
visible=True,
|
273 |
-
value="unrealistic, cartoon, anime, sketch, painting, drawing, illustration, graphic, digital art, render, 3d, blurry, deformed, disfigured, poorly drawn, bad anatomy, mutated, extra limbs, ugly, out of frame, bad composition, low resolution, grainy, pixelated, noisy, oversaturated, undersaturated, (worst quality, low quality:1.3), (bad hands, missing fingers:1.2)"
|
274 |
-
)
|
275 |
-
negative_prompt_3 = gr.Text(
|
276 |
-
label="Negative prompt 3",
|
277 |
-
max_lines=1,
|
278 |
-
placeholder="Enter a third negative prompt",
|
279 |
-
visible=True,
|
280 |
-
value="(worst quality, low quality:1.3), (bad anatomy, bad hands, missing fingers, extra digit, fewer digits:1.2), (blurry:1.1), cropped, watermark, text, signature, logo, jpeg artifacts, (ugly, deformed, disfigured:1.2), (poorly drawn:1.2), mutated, extra limbs, (bad proportions, gross proportions:1.2), (malformed limbs, missing arms, missing legs, extra arms, extra legs:1.2), (fused fingers, too many fingers, long neck:1.2), (unnatural body, unnatural pose:1.1), out of frame, (bad composition, poorly composed:1.1), (oversaturated, undersaturated:1.1), (grainy, pixelated:1.1), (low resolution, noisy:1.1), (unrealistic, distorted:1.1), (extra fingers, mutated hands, poorly drawn hands, bad hands:1.3), (missing fingers:1.3)"
|
281 |
-
)
|
282 |
with gr.Row():
|
283 |
width = gr.Slider(
|
284 |
label="Width",
|
|
|
206 |
run_button = gr.Button("Run", scale=0, variant="primary")
|
207 |
result = gr.Image(label="Result", show_label=False)
|
208 |
with gr.Accordion("Advanced Settings", open=True):
|
209 |
+
with gr.Row():
|
210 |
+
latent_file = gr.File(label="Image Prompt (Required)")
|
211 |
+
file_1_strength = gr.Slider(
|
212 |
+
label="Img 1 %",
|
213 |
+
minimum=0.0,
|
214 |
+
maximum=16.0,
|
215 |
+
step=0.01,
|
216 |
+
value=1.0,
|
217 |
+
)
|
218 |
+
latent_file_2 = gr.File(label="Image Prompt 2 (Optional)")
|
219 |
+
file_2_strength = gr.Slider(
|
220 |
+
label="Img 2 %",
|
221 |
+
minimum=0.0,
|
222 |
+
maximum=16.0,
|
223 |
+
step=0.01,
|
224 |
+
value=1.0,
|
225 |
+
)
|
226 |
+
latent_file_3 = gr.File(label="Image Prompt 3 (Optional)")
|
227 |
+
file_3_strength = gr.Slider(
|
228 |
+
label="Img 3 %",
|
229 |
+
minimum=0.0,
|
230 |
+
maximum=16.0,
|
231 |
+
step=0.01,
|
232 |
+
value=1.0,
|
233 |
+
)
|
234 |
+
latent_file_4 = gr.File(label="Image Prompt 4 (Optional)")
|
235 |
+
file_4_strength = gr.Slider(
|
236 |
+
label="Img 4 %",
|
237 |
+
minimum=0.0,
|
238 |
+
maximum=16.0,
|
239 |
+
step=0.01,
|
240 |
+
value=1.0,
|
241 |
+
)
|
242 |
+
latent_file_5 = gr.File(label="Image Prompt 5 (Optional)")
|
243 |
+
file_5_strength = gr.Slider(
|
244 |
+
label="Img 5 %",
|
245 |
+
minimum=0.0,
|
246 |
+
maximum=16.0,
|
247 |
+
step=0.01,
|
248 |
+
value=1.0,
|
249 |
+
)
|
250 |
+
image_encoder_path = gr.Dropdown(
|
251 |
+
["google/siglip-so400m-patch14-384", "laion/CLIP-ViT-H-14-laion2B-s32B-b79K"],
|
252 |
+
label="CLIP Model",
|
253 |
+
)
|
254 |
+
ip_scale = gr.Slider(
|
255 |
+
label="Image Prompt Scale",
|
256 |
+
minimum=0.0,
|
257 |
+
maximum=2.0,
|
258 |
+
step=0.01,
|
259 |
+
value=0.5,
|
260 |
+
)
|
261 |
+
negative_prompt_1 = gr.Text(
|
262 |
+
label="Negative prompt 1",
|
263 |
+
max_lines=1,
|
264 |
+
placeholder="Enter a negative prompt",
|
265 |
+
visible=True,
|
266 |
+
value="bad anatomy, poorly drawn hands, distorted face, blurry, out of frame, low resolution, grainy, pixelated, disfigured, mutated, extra limbs, bad composition"
|
267 |
+
)
|
268 |
+
negative_prompt_2 = gr.Text(
|
269 |
+
label="Negative prompt 2",
|
270 |
+
max_lines=1,
|
271 |
+
placeholder="Enter a second negative prompt",
|
272 |
+
visible=True,
|
273 |
+
value="unrealistic, cartoon, anime, sketch, painting, drawing, illustration, graphic, digital art, render, 3d, blurry, deformed, disfigured, poorly drawn, bad anatomy, mutated, extra limbs, ugly, out of frame, bad composition, low resolution, grainy, pixelated, noisy, oversaturated, undersaturated, (worst quality, low quality:1.3), (bad hands, missing fingers:1.2)"
|
274 |
+
)
|
275 |
+
negative_prompt_3 = gr.Text(
|
276 |
+
label="Negative prompt 3",
|
277 |
+
max_lines=1,
|
278 |
+
placeholder="Enter a third negative prompt",
|
279 |
+
visible=True,
|
280 |
+
value="(worst quality, low quality:1.3), (bad anatomy, bad hands, missing fingers, extra digit, fewer digits:1.2), (blurry:1.1), cropped, watermark, text, signature, logo, jpeg artifacts, (ugly, deformed, disfigured:1.2), (poorly drawn:1.2), mutated, extra limbs, (bad proportions, gross proportions:1.2), (malformed limbs, missing arms, missing legs, extra arms, extra legs:1.2), (fused fingers, too many fingers, long neck:1.2), (unnatural body, unnatural pose:1.1), out of frame, (bad composition, poorly composed:1.1), (oversaturated, undersaturated:1.1), (grainy, pixelated:1.1), (low resolution, noisy:1.1), (unrealistic, distorted:1.1), (extra fingers, mutated hands, poorly drawn hands, bad hands:1.3), (missing fingers:1.3)"
|
281 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
282 |
with gr.Row():
|
283 |
width = gr.Slider(
|
284 |
label="Width",
|