Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -127,44 +127,41 @@ with gr.Blocks() as demo:
|
|
127 |
image_input_2 = gr.Image(label="Top-wear", type="filepath")
|
128 |
image_input_3 = gr.Image(label="Bottom-wear", type="filepath")
|
129 |
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
)
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
use_input_image_size_as_output = gr.Checkbox(
|
166 |
-
label="use_input_image_size_as_output", info="Automatically adjust the output image size to be same as input image size. For editing and controlnet task, it can make sure the output image has the same size as input image leading to better performance", value=False,
|
167 |
-
)
|
168 |
|
169 |
# generate
|
170 |
generate_button = gr.Button("Generate Image")
|
|
|
127 |
image_input_2 = gr.Image(label="Top-wear", type="filepath")
|
128 |
image_input_3 = gr.Image(label="Bottom-wear", type="filepath")
|
129 |
|
130 |
+
with gr.Column():
|
131 |
+
# sliders
|
132 |
+
height_input = gr.Slider(
|
133 |
+
label="Height", minimum=128, maximum=2048, value=1024, step=16
|
134 |
+
)
|
135 |
+
width_input = gr.Slider(
|
136 |
+
label="Width", minimum=128, maximum=2048, value=1024, step=16
|
137 |
+
)
|
138 |
+
|
139 |
+
# guidance_scale_input = gr.Slider(
|
140 |
+
# label="Guidance Scale", minimum=1.0, maximum=5.0, value=2.5, step=0.1
|
141 |
+
# )
|
142 |
+
|
143 |
+
num_inference_steps = gr.Slider(
|
144 |
+
label="Inference Steps", minimum=1, maximum=100, value=50, step=1
|
145 |
+
)
|
146 |
+
|
147 |
+
seed_input = gr.Slider(
|
148 |
+
label="Seed", minimum=0, maximum=2147483647, value=42, step=1
|
149 |
+
)
|
150 |
+
randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
|
151 |
+
|
152 |
+
with gr.Column():
|
153 |
+
img_guidance_scale_input = gr.Slider(label="img_guidance_scale", minimum=1.0, maximum=2.0, value=1.6, step=0.1)
|
154 |
+
|
155 |
+
max_input_image_size = gr.Slider(label="max_input_image_size", minimum=128, maximum=2048, value=1024, step=16)
|
156 |
+
|
157 |
+
separate_cfg_infer = gr.Checkbox(
|
158 |
+
label="separate_cfg_infer", info="Whether to use separate inference process for different guidance. This will reduce the memory cost.", value=True,)
|
159 |
+
|
160 |
+
offload_model = gr.Checkbox(
|
161 |
+
label="offload_model", info="Offload model to CPU, which will significantly reduce the memory cost but slow down the generation speed. You can cancel separate_cfg_infer and set offload_model=True. If both separate_cfg_infer and offload_model are True, further reduce the memory, but slowest generation", value=False,)
|
162 |
+
|
163 |
+
use_input_image_size_as_output = gr.Checkbox(
|
164 |
+
label="use_input_image_size_as_output", info="Automatically adjust the output image size to be same as input image size. For editing and controlnet task, it can make sure the output image has the same size as input image leading to better performance", value=False,)
|
|
|
|
|
|
|
165 |
|
166 |
# generate
|
167 |
generate_button = gr.Button("Generate Image")
|