Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -126,6 +126,7 @@ def process(
|
|
126 |
input_image: Image.Image,
|
127 |
user_prompt: str,
|
128 |
use_KDS: bool,
|
|
|
129 |
positive_prompt: str,
|
130 |
negative_prompt: str,
|
131 |
num_inference_steps: int,
|
@@ -176,7 +177,8 @@ def process(
|
|
176 |
height=height, width=width,
|
177 |
guidance_scale=cfg_scale, conditioning_scale=1,
|
178 |
start_point='lr', start_steps=999,ram_encoder_hidden_states=ram_encoder_hidden_states,
|
179 |
-
latent_tiled_size=latent_tiled_size, latent_tiled_overlap=latent_tiled_overlap, use_KDS=use_KDS
|
|
|
180 |
).images[0]
|
181 |
|
182 |
if True: # alpha<1.0:
|
@@ -208,6 +210,7 @@ with block:
|
|
208 |
with gr.Row():
|
209 |
with gr.Column():
|
210 |
input_image = gr.Image(type="pil")
|
|
|
211 |
use_KDS = gr.Checkbox(label="Use Kernel Density Steering")
|
212 |
run_button = gr.Button("Run")
|
213 |
with gr.Accordion("Options", open=True):
|
@@ -231,6 +234,7 @@ with block:
|
|
231 |
input_image,
|
232 |
user_prompt,
|
233 |
use_KDS,
|
|
|
234 |
positive_prompt,
|
235 |
negative_prompt,
|
236 |
num_inference_steps,
|
|
|
126 |
input_image: Image.Image,
|
127 |
user_prompt: str,
|
128 |
use_KDS: bool,
|
129 |
+
num_particles: int,
|
130 |
positive_prompt: str,
|
131 |
negative_prompt: str,
|
132 |
num_inference_steps: int,
|
|
|
177 |
height=height, width=width,
|
178 |
guidance_scale=cfg_scale, conditioning_scale=1,
|
179 |
start_point='lr', start_steps=999,ram_encoder_hidden_states=ram_encoder_hidden_states,
|
180 |
+
latent_tiled_size=latent_tiled_size, latent_tiled_overlap=latent_tiled_overlap, use_KDS=use_KDS,
|
181 |
+
num_particles=num_particles
|
182 |
).images[0]
|
183 |
|
184 |
if True: # alpha<1.0:
|
|
|
210 |
with gr.Row():
|
211 |
with gr.Column():
|
212 |
input_image = gr.Image(type="pil")
|
213 |
+
num_particles = gr.Slider(label="Num of Partickes", minimum=1, maximum=16, step=1, value=4)
|
214 |
use_KDS = gr.Checkbox(label="Use Kernel Density Steering")
|
215 |
run_button = gr.Button("Run")
|
216 |
with gr.Accordion("Options", open=True):
|
|
|
234 |
input_image,
|
235 |
user_prompt,
|
236 |
use_KDS,
|
237 |
+
num_particles,
|
238 |
positive_prompt,
|
239 |
negative_prompt,
|
240 |
num_inference_steps,
|