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 |
num_particles: int,
|
130 |
positive_prompt: str,
|
131 |
negative_prompt: str,
|
@@ -177,8 +178,8 @@ def process(
|
|
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,
|
181 |
-
num_particles=num_particles
|
182 |
).images[0]
|
183 |
|
184 |
if True: # alpha<1.0:
|
@@ -211,7 +212,8 @@ with block:
|
|
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=10)
|
214 |
-
|
|
|
215 |
run_button = gr.Button("Run")
|
216 |
with gr.Accordion("Options", open=True):
|
217 |
user_prompt = gr.Textbox(label="User Prompt", value="")
|
@@ -234,6 +236,7 @@ with block:
|
|
234 |
input_image,
|
235 |
user_prompt,
|
236 |
use_KDS,
|
|
|
237 |
num_particles,
|
238 |
positive_prompt,
|
239 |
negative_prompt,
|
|
|
126 |
input_image: Image.Image,
|
127 |
user_prompt: str,
|
128 |
use_KDS: bool,
|
129 |
+
bandwidth: float,
|
130 |
num_particles: int,
|
131 |
positive_prompt: str,
|
132 |
negative_prompt: str,
|
|
|
178 |
height=height, width=width,
|
179 |
guidance_scale=cfg_scale, conditioning_scale=1,
|
180 |
start_point='lr', start_steps=999,ram_encoder_hidden_states=ram_encoder_hidden_states,
|
181 |
+
latent_tiled_size=latent_tiled_size, latent_tiled_overlap=latent_tiled_overlap,
|
182 |
+
use_KDS=use_KDS, bandwidth=bandwidth, num_particles=num_particles
|
183 |
).images[0]
|
184 |
|
185 |
if True: # alpha<1.0:
|
|
|
212 |
with gr.Column():
|
213 |
input_image = gr.Image(type="pil")
|
214 |
num_particles = gr.Slider(label="Num of Partickes", minimum=1, maximum=16, step=1, value=10)
|
215 |
+
bandwidth = gr.Slider(label="Bandwidth", minimum=0.1, maximum=0.8, step=0.1, value=0.1)
|
216 |
+
use_KDS = gr.Checkbox(label="Use Kernel Density Steering")
|
217 |
run_button = gr.Button("Run")
|
218 |
with gr.Accordion("Options", open=True):
|
219 |
user_prompt = gr.Textbox(label="User Prompt", value="")
|
|
|
236 |
input_image,
|
237 |
user_prompt,
|
238 |
use_KDS,
|
239 |
+
bandwidth,
|
240 |
num_particles,
|
241 |
positive_prompt,
|
242 |
negative_prompt,
|