alexnasa commited on
Commit
63f12be
·
verified ·
1 Parent(s): 8f3c995

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -125,6 +125,7 @@ tag_model.to(device, dtype=weight_dtype)
125
  def process(
126
  input_image: Image.Image,
127
  user_prompt: str,
 
128
  positive_prompt: str,
129
  negative_prompt: str,
130
  num_inference_steps: int,
@@ -175,7 +176,7 @@ def process(
175
  height=height, width=width,
176
  guidance_scale=cfg_scale, conditioning_scale=1,
177
  start_point='lr', start_steps=999,ram_encoder_hidden_states=ram_encoder_hidden_states,
178
- latent_tiled_size=latent_tiled_size, latent_tiled_overlap=latent_tiled_overlap
179
  ).images[0]
180
 
181
  if True: # alpha<1.0:
@@ -207,6 +208,7 @@ with block:
207
  with gr.Row():
208
  with gr.Column():
209
  input_image = gr.Image(type="pil")
 
210
  run_button = gr.Button("Run")
211
  with gr.Accordion("Options", open=True):
212
  user_prompt = gr.Textbox(label="User Prompt", value="")
@@ -228,6 +230,7 @@ with block:
228
  inputs = [
229
  input_image,
230
  user_prompt,
 
231
  positive_prompt,
232
  negative_prompt,
233
  num_inference_steps,
 
125
  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
  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
  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):
214
  user_prompt = gr.Textbox(label="User Prompt", value="")
 
230
  inputs = [
231
  input_image,
232
  user_prompt,
233
+ use_KDS,
234
  positive_prompt,
235
  negative_prompt,
236
  num_inference_steps,