Spaces:
Running
on
A10G
Running
on
A10G
Update app.py
Browse files
app.py
CHANGED
@@ -49,7 +49,14 @@ def predict(request: gr.Request, *args, progress=gr.Progress(track_tqdm=True)):
|
|
49 |
title = "Demo for consistent-character cog image by fofr"
|
50 |
description = "Create images of a given character in different poses • running cog image by fofr"
|
51 |
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
with gr.Column(elem_id="col-container"):
|
54 |
gr.HTML(f"""
|
55 |
<h2 style="text-align: center;">Consistent Character Workflow</h2>
|
@@ -70,12 +77,13 @@ with gr.Blocks() as app:
|
|
70 |
|
71 |
with gr.Accordion(label="Advanced Settings", open=False):
|
72 |
negative_prompt = gr.Textbox(
|
73 |
-
label="Negative Prompt", info='''Things you do not want to see in your image'''
|
|
|
74 |
)
|
75 |
|
76 |
number_of_outputs = gr.Slider(
|
77 |
-
label="Number Of Outputs", info='''The number of images to generate.''', value=
|
78 |
-
minimum=1, maximum=
|
79 |
)
|
80 |
|
81 |
number_of_images_per_pose = gr.Slider(
|
@@ -105,5 +113,12 @@ with gr.Blocks() as app:
|
|
105 |
inputs = [prompt, negative_prompt, subject, number_of_outputs, number_of_images_per_pose, randomise_poses, output_format, output_quality, seed]
|
106 |
outputs = [consistent_results]
|
107 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
app.queue().launch(share=False)
|
109 |
|
|
|
49 |
title = "Demo for consistent-character cog image by fofr"
|
50 |
description = "Create images of a given character in different poses • running cog image by fofr"
|
51 |
|
52 |
+
css="""
|
53 |
+
#col-container{
|
54 |
+
margin: 0 auto;
|
55 |
+
max-width: 780px;
|
56 |
+
text-align: left;
|
57 |
+
}
|
58 |
+
"""
|
59 |
+
with gr.Blocks(css=css) as app:
|
60 |
with gr.Column(elem_id="col-container"):
|
61 |
gr.HTML(f"""
|
62 |
<h2 style="text-align: center;">Consistent Character Workflow</h2>
|
|
|
77 |
|
78 |
with gr.Accordion(label="Advanced Settings", open=False):
|
79 |
negative_prompt = gr.Textbox(
|
80 |
+
label="Negative Prompt", info='''Things you do not want to see in your image''',
|
81 |
+
value="text, watermark, lowres, low quality, worst quality, deformed, glitch, low contrast, noisy, saturation, blurry"
|
82 |
)
|
83 |
|
84 |
number_of_outputs = gr.Slider(
|
85 |
+
label="Number Of Outputs", info='''The number of images to generate.''', value=2,
|
86 |
+
minimum=1, maximum=4, step=1,
|
87 |
)
|
88 |
|
89 |
number_of_images_per_pose = gr.Slider(
|
|
|
113 |
inputs = [prompt, negative_prompt, subject, number_of_outputs, number_of_images_per_pose, randomise_poses, output_format, output_quality, seed]
|
114 |
outputs = [consistent_results]
|
115 |
|
116 |
+
submit_btn.click(
|
117 |
+
fn = predict,
|
118 |
+
inputs = inputs,
|
119 |
+
outputs = outputs
|
120 |
+
api_open = False
|
121 |
+
)
|
122 |
+
|
123 |
app.queue().launch(share=False)
|
124 |
|