anvilinteractiv commited on
Commit
23aa6df
·
verified ·
1 Parent(s): fdbb880

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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=5)
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)
@@ -337,7 +337,7 @@ def run_segmentation(image):
337
  logger.error(f"Error in run_segmentation: {str(e)}")
338
  raise
339
 
340
- @spaces.GPU(duration=5)
341
  @torch.no_grad()
342
  def image_to_3d(
343
  image, # Changed to accept FileData dict or PIL Image
@@ -391,7 +391,7 @@ def image_to_3d(
391
  logger.error(f"Error in image_to_3d: {str(e)}")
392
  raise
393
 
394
- @spaces.GPU(duration=5)
395
  @torch.no_grad()
396
  def run_texture(image: Image, mesh_path: str, seed: int, req: gr.Request):
397
  try:
@@ -485,7 +485,7 @@ def run_texture(image: Image, mesh_path: str, seed: int, req: gr.Request):
485
  logger.error(f"Error in run_texture: {str(e)}")
486
  raise
487
 
488
- @spaces.GPU(duration=5)
489
  @torch.no_grad()
490
  def run_full_api(image, seed: int = 0, num_inference_steps: int = 50, guidance_scale: float = 7.5, simplify: bool = True, target_face_num: int = DEFAULT_FACE_NUMBER, req: gr.Request = None):
491
  try:
 
117
  random_hex = random_bytes.hex()
118
  return random_hex
119
 
120
+ @spaces.GPU(duration=3)
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)
 
337
  logger.error(f"Error in run_segmentation: {str(e)}")
338
  raise
339
 
340
+ @spaces.GPU(duration=3)
341
  @torch.no_grad()
342
  def image_to_3d(
343
  image, # Changed to accept FileData dict or PIL Image
 
391
  logger.error(f"Error in image_to_3d: {str(e)}")
392
  raise
393
 
394
+ @spaces.GPU(duration=3)
395
  @torch.no_grad()
396
  def run_texture(image: Image, mesh_path: str, seed: int, req: gr.Request):
397
  try:
 
485
  logger.error(f"Error in run_texture: {str(e)}")
486
  raise
487
 
488
+ @spaces.GPU(duration=3)
489
  @torch.no_grad()
490
  def run_full_api(image, seed: int = 0, num_inference_steps: int = 50, guidance_scale: float = 7.5, simplify: bool = True, target_face_num: int = DEFAULT_FACE_NUMBER, req: gr.Request = None):
491
  try: