anvilinteractiv commited on
Commit
65dfc03
·
verified ·
1 Parent(s): 2c0de48

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -117,7 +117,7 @@ def get_random_hex():
117
  random_hex = random_bytes.hex()
118
  return random_hex
119
 
120
- @spaces.GPU(duration=180)
121
  def run_full(image: str, seed: int = 0, num_inference_steps: int = 50, guidance_scale: float = 7.5, simplify: bool = True, target_face_num: int = DEFAULT_FACE_NUMBER, req=None):
122
  try:
123
  image_seg = prepare_image(image, bg_color=np.array([1.0, 1.0, 1.0]), rmbg_net=rmbg_net)
@@ -303,7 +303,7 @@ def run_segmentation(image: str):
303
  logger.error(f"Error in run_segmentation: {str(e)}")
304
  raise
305
 
306
- @spaces.GPU(duration=90)
307
  @torch.no_grad()
308
  def image_to_3d(
309
  image, # Changed to accept FileData dict or PIL Image
@@ -357,7 +357,7 @@ def image_to_3d(
357
  logger.error(f"Error in image_to_3d: {str(e)}")
358
  raise
359
 
360
- @spaces.GPU(duration=120)
361
  @torch.no_grad()
362
  def run_texture(image: Image, mesh_path: str, seed: int, req: gr.Request):
363
  try:
 
117
  random_hex = random_bytes.hex()
118
  return random_hex
119
 
120
+ @spaces.GPU(duration=30)
121
  def run_full(image: str, seed: int = 0, num_inference_steps: int = 50, guidance_scale: float = 7.5, simplify: bool = True, target_face_num: int = DEFAULT_FACE_NUMBER, req=None):
122
  try:
123
  image_seg = prepare_image(image, bg_color=np.array([1.0, 1.0, 1.0]), rmbg_net=rmbg_net)
 
303
  logger.error(f"Error in run_segmentation: {str(e)}")
304
  raise
305
 
306
+ @spaces.GPU(duration=30)
307
  @torch.no_grad()
308
  def image_to_3d(
309
  image, # Changed to accept FileData dict or PIL Image
 
357
  logger.error(f"Error in image_to_3d: {str(e)}")
358
  raise
359
 
360
+ @spaces.GPU(duration=30)
361
  @torch.no_grad()
362
  def run_texture(image: Image, mesh_path: str, seed: int, req: gr.Request):
363
  try: