dkatz2391 commited on
Commit
98f78e9
·
verified ·
1 Parent(s): 5d24a95

even earlier

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -89,7 +89,7 @@ def text_to_3d(
89
  slat_guidance_strength: float,
90
  slat_sampling_steps: int,
91
  req: gr.Request,
92
- ) -> Tuple[dict, str, dict]:
93
  """
94
  Convert an text prompt to a 3D model.
95
  Args:
@@ -102,7 +102,6 @@ def text_to_3d(
102
  Returns:
103
  dict: The information of the generated 3D model.
104
  str: The path to the video of the 3D model.
105
- dict: The state of the generated 3D model.
106
  """
107
  user_dir = os.path.join(TMP_DIR, str(req.session_hash))
108
  os.makedirs(user_dir, exist_ok=True)
@@ -126,8 +125,7 @@ def text_to_3d(
126
  imageio.mimsave(video_path, video, fps=15)
127
  state = pack_state(outputs['gaussian'][0], outputs['mesh'][0])
128
  torch.cuda.empty_cache()
129
- # Return state for JSON, video path for Video, and state again for internal buffer
130
- return state, video_path, state
131
 
132
 
133
  @spaces.GPU(duration=90)
 
89
  slat_guidance_strength: float,
90
  slat_sampling_steps: int,
91
  req: gr.Request,
92
+ ) -> Tuple[dict, str]:
93
  """
94
  Convert an text prompt to a 3D model.
95
  Args:
 
102
  Returns:
103
  dict: The information of the generated 3D model.
104
  str: The path to the video of the 3D model.
 
105
  """
106
  user_dir = os.path.join(TMP_DIR, str(req.session_hash))
107
  os.makedirs(user_dir, exist_ok=True)
 
125
  imageio.mimsave(video_path, video, fps=15)
126
  state = pack_state(outputs['gaussian'][0], outputs['mesh'][0])
127
  torch.cuda.empty_cache()
128
+ return state, video_path
 
129
 
130
 
131
  @spaces.GPU(duration=90)