multimodalart HF staff commited on
Commit
58d63d7
1 Parent(s): ef263bb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -270,7 +270,7 @@ def remove_custom_lora(selected_indices, current_loras):
270
  lora_image_2
271
  )
272
 
273
- @spaces.GPU(duration=90)
274
  def generate_image(prompt_mash, steps, seed, cfg_scale, width, height, progress):
275
  print("Generating image...")
276
  pipe.to("cuda")
@@ -290,7 +290,7 @@ def generate_image(prompt_mash, steps, seed, cfg_scale, width, height, progress)
290
  ):
291
  yield img
292
 
293
- @spaces.GPU(duration=90)
294
  def generate_image_to_image(prompt_mash, image_input_path, image_strength, steps, cfg_scale, width, height, seed):
295
  pipe_i2i.to("cuda")
296
  generator = torch.Generator(device="cuda").manual_seed(seed)
@@ -309,7 +309,6 @@ def generate_image_to_image(prompt_mash, image_input_path, image_strength, steps
309
  ).images[0]
310
  return final_image
311
 
312
- @spaces.GPU(duration=90)
313
  def run_lora(prompt, image_input, image_strength, cfg_scale, steps, selected_indices, lora_scale_1, lora_scale_2, randomize_seed, seed, width, height, loras_state, progress=gr.Progress(track_tqdm=True)):
314
  if not selected_indices:
315
  raise gr.Error("You must select at least one LoRA before proceeding.")
 
270
  lora_image_2
271
  )
272
 
273
+ @spaces.GPU(duration=75)
274
  def generate_image(prompt_mash, steps, seed, cfg_scale, width, height, progress):
275
  print("Generating image...")
276
  pipe.to("cuda")
 
290
  ):
291
  yield img
292
 
293
+ @spaces.GPU(duration=75)
294
  def generate_image_to_image(prompt_mash, image_input_path, image_strength, steps, cfg_scale, width, height, seed):
295
  pipe_i2i.to("cuda")
296
  generator = torch.Generator(device="cuda").manual_seed(seed)
 
309
  ).images[0]
310
  return final_image
311
 
 
312
  def run_lora(prompt, image_input, image_strength, cfg_scale, steps, selected_indices, lora_scale_1, lora_scale_2, randomize_seed, seed, width, height, loras_state, progress=gr.Progress(track_tqdm=True)):
313
  if not selected_indices:
314
  raise gr.Error("You must select at least one LoRA before proceeding.")