frogleo commited on
Commit
d46f000
·
verified ·
1 Parent(s): 31dae9f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -155,7 +155,7 @@ def update_dimensions_from_image(image_list, width, height):
155
  return new_width, new_height
156
 
157
  # Updated duration function to match generate_image arguments (including progress)
158
- def get_duration(prompt_embeds, image_list, width, height, num_inference_steps, guidance_scale, seed, progress=gr.Progress(track_tqdm=True)):
159
  num_images = 0 if image_list is None else len(image_list)
160
  step_duration = 1 + 0.8 * num_images
161
  return max(65, num_inference_steps * step_duration + 10)
@@ -189,7 +189,7 @@ def generate_image(prompt_embeds, image_list, width, height, num_inference_steps
189
  ).images[0]
190
  return image
191
 
192
- def infer(prompt, input_images=None, seed=42, randomize_seed=False, width=1024, height=1024, num_inference_steps=50, guidance_scale=2.5, prompt_upsampling=False, progress=gr.Progress(track_tqdm=True)):
193
 
194
  if randomize_seed:
195
  seed = random.randint(0, MAX_SEED)
 
155
  return new_width, new_height
156
 
157
  # Updated duration function to match generate_image arguments (including progress)
158
+ def get_duration(prompt_embeds, image_list, width, height, num_inference_steps, guidance_scale, seed, progress=gr.Progress()):
159
  num_images = 0 if image_list is None else len(image_list)
160
  step_duration = 1 + 0.8 * num_images
161
  return max(65, num_inference_steps * step_duration + 10)
 
189
  ).images[0]
190
  return image
191
 
192
+ def infer(prompt, input_images=None, seed=42, randomize_seed=False, width=1024, height=1024, num_inference_steps=50, guidance_scale=2.5, prompt_upsampling=False, progress=gr.Progress()):
193
 
194
  if randomize_seed:
195
  seed = random.randint(0, MAX_SEED)