hansyan commited on
Commit
ec82a85
β€’
1 Parent(s): 47b803c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -60,7 +60,7 @@ pipe_t2i.to('cuda:0', torch.float16)
60
  ### gradio
61
  rembg_session = rembg.new_session()
62
 
63
- +@spaces.GPU
64
  def generate(text, seed):
65
  def fill_background(image):
66
  image = np.array(image).astype(np.float32) / 255.0
@@ -91,7 +91,7 @@ def generate(text, seed):
91
  image = fill_background(image)
92
  return image
93
 
94
- +@spaces.GPU
95
  def render(image, mc_resolution=256, formats=["obj"]):
96
  scene_codes = model(image, device=device)
97
  mesh = model.extract_mesh(scene_codes, resolution=mc_resolution)[0]
 
60
  ### gradio
61
  rembg_session = rembg.new_session()
62
 
63
+ @spaces.GPU
64
  def generate(text, seed):
65
  def fill_background(image):
66
  image = np.array(image).astype(np.float32) / 255.0
 
91
  image = fill_background(image)
92
  return image
93
 
94
+ @spaces.GPU
95
  def render(image, mc_resolution=256, formats=["obj"]):
96
  scene_codes = model(image, device=device)
97
  mesh = model.extract_mesh(scene_codes, resolution=mc_resolution)[0]