Deadmon commited on
Commit
50114c8
·
verified ·
1 Parent(s): 66e9b1d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -33,6 +33,7 @@ def preprocess_image(image, target_width, target_height):
33
  image = image.resize((target_width, target_height), Image.LANCZOS)
34
  return image
35
 
 
36
  def generate_image(prompt, control_image, control_mode, controlnet_conditioning_scale, num_steps, guidance, width, height, seed, random_seed):
37
  if random_seed:
38
  seed = np.random.randint(0, 10000)
 
33
  image = image.resize((target_width, target_height), Image.LANCZOS)
34
  return image
35
 
36
+ @spaces.GPU(duration=120)
37
  def generate_image(prompt, control_image, control_mode, controlnet_conditioning_scale, num_steps, guidance, width, height, seed, random_seed):
38
  if random_seed:
39
  seed = np.random.randint(0, 10000)