Spaces:
Runtime error
Runtime error
Commit
·
dc887cd
1
Parent(s):
d31b23b
Update app.py
Browse files
app.py
CHANGED
@@ -248,10 +248,9 @@ with gr.Blocks(css=css) as demo:
|
|
248 |
with gr.Tab("txt2img", id='t2i'):
|
249 |
with gr.Row():
|
250 |
with gr.Column(scale=6, min_width=600):
|
251 |
-
prompt = gr.Textbox("
|
252 |
-
placeholder="Prompt", show_label=False, lines=3)
|
253 |
negative_prompt = gr.Textbox(placeholder="Negative Prompt", show_label=False, lines=3,
|
254 |
-
value="
|
255 |
with gr.Column():
|
256 |
text_button = gr.Button("Generate", variant='primary', elem_id="generate")
|
257 |
|
@@ -280,8 +279,8 @@ with gr.Blocks(css=css) as demo:
|
|
280 |
|
281 |
with gr.Column(scale=2):
|
282 |
image_output = gr.Image(show_label=False, type="filepath", interactive=False)
|
283 |
-
send_to_img2img = gr.Button(value="Send to img2img")
|
284 |
-
send_to_png = gr.Button(value="Send to PNG Info")
|
285 |
|
286 |
|
287 |
text_button.click(txt2img, inputs=[prompt, negative_prompt, model, steps, sampler, cfg_scale, width, height,
|
@@ -290,10 +289,9 @@ with gr.Blocks(css=css) as demo:
|
|
290 |
with gr.Tab("img2img", id='i2i'):
|
291 |
with gr.Row():
|
292 |
with gr.Column(scale=6, min_width=600):
|
293 |
-
i2i_prompt = gr.Textbox("
|
294 |
-
placeholder="Prompt", show_label=False, lines=3)
|
295 |
i2i_negative_prompt = gr.Textbox(placeholder="Negative Prompt", show_label=False, lines=3,
|
296 |
-
value="
|
297 |
with gr.Column():
|
298 |
i2i_text_button = gr.Button("Generate", variant='primary', elem_id="generate")
|
299 |
|
@@ -325,7 +323,7 @@ with gr.Blocks(css=css) as demo:
|
|
325 |
|
326 |
with gr.Column(scale=2):
|
327 |
i2i_image_output = gr.Image(show_label=False, type="filepath", interactive=False)
|
328 |
-
send_to_png_i2i = gr.Button(value="Send to PNG Info")
|
329 |
|
330 |
i2i_text_button.click(img2img, inputs=[i2i_image_input, i2i_denoising, i2i_prompt, i2i_negative_prompt,
|
331 |
model, i2i_steps, i2i_sampler, i2i_cfg_scale, i2i_width, i2i_height,
|
@@ -361,12 +359,12 @@ with gr.Blocks(css=css) as demo:
|
|
361 |
with gr.Row():
|
362 |
with gr.Column():
|
363 |
image_input = gr.Image(type="pil")
|
364 |
-
|
365 |
|
366 |
with gr.Column():
|
367 |
exif_output = gr.HTML(label="EXIF Data")
|
368 |
-
send_to_txt2img_btn = gr.Button("Send to txt2img")
|
369 |
-
send_to_img2img_png = gr.Button("Send to img2img")
|
370 |
|
371 |
image_input.upload(get_exif_data, inputs=[image_input], outputs=exif_output)
|
372 |
png_button.click(get_exif_data, inputs=[image_input], outputs=exif_output)
|
@@ -383,10 +381,9 @@ with gr.Blocks(css=css) as demo:
|
|
383 |
hf_model = gr.Dropdown(label="HuggingFace checkpoint", choices=["runwayml/stable-diffusion-v1-5", "stabilityai/stable-diffusion-2-1", "dataautogpt3/OpenDalleV1.1", "CompVis/stable-diffusion-v1-4", "playgroundai/playground-v2-1024px-aesthetic", "prompthero/openjourney", "openskyml/dreamdrop-v1", "SG161222/Realistic_Vision_V1.4", "digiplay/AbsoluteReality_v1.8.1", "openskyml/dalle-3-xl", "Lykon/dreamshaper-7", "Pclanglais/Mickey-1928"], value="runwayml/stable-diffusion-v1-5", allow_custom_value=True, interactive=True)
|
384 |
with gr.Row():
|
385 |
with gr.Column(scale=6, min_width=600):
|
386 |
-
hf_prompt = gr.Textbox("
|
387 |
-
placeholder="Prompt", show_label=False, lines=3)
|
388 |
hf_negative_prompt = gr.Textbox(placeholder="Negative Prompt", show_label=False, lines=3,
|
389 |
-
value="
|
390 |
with gr.Column():
|
391 |
hf_text_button = gr.Button("Generate with HF", variant='primary', elem_id="generate")
|
392 |
|
|
|
248 |
with gr.Tab("txt2img", id='t2i'):
|
249 |
with gr.Row():
|
250 |
with gr.Column(scale=6, min_width=600):
|
251 |
+
prompt = gr.Textbox(placeholder="Prompt", show_label=False, lines=3)
|
|
|
252 |
negative_prompt = gr.Textbox(placeholder="Negative Prompt", show_label=False, lines=3,
|
253 |
+
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")
|
254 |
with gr.Column():
|
255 |
text_button = gr.Button("Generate", variant='primary', elem_id="generate")
|
256 |
|
|
|
279 |
|
280 |
with gr.Column(scale=2):
|
281 |
image_output = gr.Image(show_label=False, type="filepath", interactive=False)
|
282 |
+
send_to_img2img = gr.Button(value="Send OUTPUT IMAGE to img2img")
|
283 |
+
send_to_png = gr.Button(value="Send OUTPUT IMAGE to PNG Info")
|
284 |
|
285 |
|
286 |
text_button.click(txt2img, inputs=[prompt, negative_prompt, model, steps, sampler, cfg_scale, width, height,
|
|
|
289 |
with gr.Tab("img2img", id='i2i'):
|
290 |
with gr.Row():
|
291 |
with gr.Column(scale=6, min_width=600):
|
292 |
+
i2i_prompt = gr.Textbox(placeholder="Prompt", show_label=False, lines=3)
|
|
|
293 |
i2i_negative_prompt = gr.Textbox(placeholder="Negative Prompt", show_label=False, lines=3,
|
294 |
+
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")
|
295 |
with gr.Column():
|
296 |
i2i_text_button = gr.Button("Generate", variant='primary', elem_id="generate")
|
297 |
|
|
|
323 |
|
324 |
with gr.Column(scale=2):
|
325 |
i2i_image_output = gr.Image(show_label=False, type="filepath", interactive=False)
|
326 |
+
send_to_png_i2i = gr.Button(value="Send INPUT IMAGE to PNG Info")
|
327 |
|
328 |
i2i_text_button.click(img2img, inputs=[i2i_image_input, i2i_denoising, i2i_prompt, i2i_negative_prompt,
|
329 |
model, i2i_steps, i2i_sampler, i2i_cfg_scale, i2i_width, i2i_height,
|
|
|
359 |
with gr.Row():
|
360 |
with gr.Column():
|
361 |
image_input = gr.Image(type="pil")
|
362 |
+
png_button = gr.Button("Get Info")
|
363 |
|
364 |
with gr.Column():
|
365 |
exif_output = gr.HTML(label="EXIF Data")
|
366 |
+
send_to_txt2img_btn = gr.Button("Send PARAMETRS to txt2img")
|
367 |
+
send_to_img2img_png = gr.Button("Send IMAGE to img2img")
|
368 |
|
369 |
image_input.upload(get_exif_data, inputs=[image_input], outputs=exif_output)
|
370 |
png_button.click(get_exif_data, inputs=[image_input], outputs=exif_output)
|
|
|
381 |
hf_model = gr.Dropdown(label="HuggingFace checkpoint", choices=["runwayml/stable-diffusion-v1-5", "stabilityai/stable-diffusion-2-1", "dataautogpt3/OpenDalleV1.1", "CompVis/stable-diffusion-v1-4", "playgroundai/playground-v2-1024px-aesthetic", "prompthero/openjourney", "openskyml/dreamdrop-v1", "SG161222/Realistic_Vision_V1.4", "digiplay/AbsoluteReality_v1.8.1", "openskyml/dalle-3-xl", "Lykon/dreamshaper-7", "Pclanglais/Mickey-1928"], value="runwayml/stable-diffusion-v1-5", allow_custom_value=True, interactive=True)
|
382 |
with gr.Row():
|
383 |
with gr.Column(scale=6, min_width=600):
|
384 |
+
hf_prompt = gr.Textbox(placeholder="Prompt", show_label=False, lines=3)
|
|
|
385 |
hf_negative_prompt = gr.Textbox(placeholder="Negative Prompt", show_label=False, lines=3,
|
386 |
+
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")
|
387 |
with gr.Column():
|
388 |
hf_text_button = gr.Button("Generate with HF", variant='primary', elem_id="generate")
|
389 |
|