alexnasa commited on
Commit
a8cd550
·
verified ·
1 Parent(s): 6b5ee45

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -114,7 +114,7 @@ def resize_image_with_aspect(image, res_range_min=128, res_range_max=1024):
114
 
115
  return resized_image
116
 
117
- @spaces.GPU()
118
  def reconstruct(input_img, caption):
119
 
120
  pipe, inverse_scheduler, scheduler = load_pipeline()
@@ -352,7 +352,7 @@ def replace_attention_processor(unet, clear=False, blur_sigma=None):
352
  else:
353
  module.processor = AttnReplaceProcessor(False, layer_type, attention_count, blur_sigma=blur_sigma)
354
 
355
- @spaces.GPU()
356
  def apply_prompt(meta_data, new_prompt):
357
 
358
  pipe, _, scheduler = load_pipeline()
@@ -416,7 +416,7 @@ def apply_prompt(meta_data, new_prompt):
416
 
417
  return image_np
418
 
419
-
420
  def on_image_change(filepath):
421
  # Extract the filename without extension
422
  filename = os.path.splitext(os.path.basename(filepath))[0]
 
114
 
115
  return resized_image
116
 
117
+ @spaces.GPU(duration=30)
118
  def reconstruct(input_img, caption):
119
 
120
  pipe, inverse_scheduler, scheduler = load_pipeline()
 
352
  else:
353
  module.processor = AttnReplaceProcessor(False, layer_type, attention_count, blur_sigma=blur_sigma)
354
 
355
+ @spaces.GPU(duration=30)
356
  def apply_prompt(meta_data, new_prompt):
357
 
358
  pipe, _, scheduler = load_pipeline()
 
416
 
417
  return image_np
418
 
419
+ @spaces.GPU(duration=30)
420
  def on_image_change(filepath):
421
  # Extract the filename without extension
422
  filename = os.path.splitext(os.path.basename(filepath))[0]