MohamedRashad commited on
Commit
45481b3
·
1 Parent(s): c499701

Add GPU decorators to skeleton and skinning generation methods in UniRigDemo

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -99,6 +99,7 @@ class UniRigDemo:
99
  except Exception as e:
100
  raise RuntimeError(f"Preprocessing failed: {str(e)}")
101
 
 
102
  def generate_skeleton(self, input_file: str, seed: int = 12345) -> Tuple[str, str, str]:
103
  """
104
  OPERATION 1: Generate skeleton for the input 3D model using Python
@@ -135,7 +136,8 @@ class UniRigDemo:
135
  preview_info = self.generate_model_preview(output_file)
136
 
137
  return "✅ Skeleton generated successfully!", output_file, preview_info
138
-
 
139
  def generate_skinning(self, skeleton_file: str) -> Tuple[str, str, str]:
140
  """
141
  OPERATION 2: Generate skinning weights for the skeleton using Python functions.
 
99
  except Exception as e:
100
  raise RuntimeError(f"Preprocessing failed: {str(e)}")
101
 
102
+ @spaces.GPU()
103
  def generate_skeleton(self, input_file: str, seed: int = 12345) -> Tuple[str, str, str]:
104
  """
105
  OPERATION 1: Generate skeleton for the input 3D model using Python
 
136
  preview_info = self.generate_model_preview(output_file)
137
 
138
  return "✅ Skeleton generated successfully!", output_file, preview_info
139
+
140
+ @spaces.GPU()
141
  def generate_skinning(self, skeleton_file: str) -> Tuple[str, str, str]:
142
  """
143
  OPERATION 2: Generate skinning weights for the skeleton using Python functions.