cocktailpeanut commited on
Commit
68d5469
β€’
1 Parent(s): 0b68850
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,4 +1,4 @@
1
- import spaces
2
  import argparse
3
  import os
4
  import tempfile
@@ -119,7 +119,7 @@ def adjust_location(x0, y0, x1, y1, input_image):
119
  draw.rectangle([(x0,y0),(x1,y1)], outline="red", width=5)
120
  return x_0, y_0, x_1, y_1, concat_img
121
 
122
- @spaces.GPU
123
  def prepare_data(device, input_image, x0, y0, x1, y1, polar, azimuth, text):
124
  if input_image.size[0] != 256 or input_image.size[1] != 256:
125
  input_image = input_image.resize((256, 256))
@@ -151,7 +151,7 @@ def prepare_data(device, input_image, x0, y0, x1, y1, polar, azimuth, text):
151
  return batch
152
 
153
 
154
- @spaces.GPU(enable_queue=True, duration=180)
155
  # def run_generation(sampler, model, device, input_image, x0, y0, x1, y1, polar, azimuth, text, seed):
156
  def run_generation(sampler, input_image, x0, y0, x1, y1, polar, azimuth, text, seed):
157
  seed_everything(seed)
 
1
+ #import spaces
2
  import argparse
3
  import os
4
  import tempfile
 
119
  draw.rectangle([(x0,y0),(x1,y1)], outline="red", width=5)
120
  return x_0, y_0, x_1, y_1, concat_img
121
 
122
+ #@spaces.GPU
123
  def prepare_data(device, input_image, x0, y0, x1, y1, polar, azimuth, text):
124
  if input_image.size[0] != 256 or input_image.size[1] != 256:
125
  input_image = input_image.resize((256, 256))
 
151
  return batch
152
 
153
 
154
+ #@spaces.GPU(enable_queue=True, duration=180)
155
  # def run_generation(sampler, model, device, input_image, x0, y0, x1, y1, polar, azimuth, text, seed):
156
  def run_generation(sampler, input_image, x0, y0, x1, y1, polar, azimuth, text, seed):
157
  seed_everything(seed)