Spaces:
Paused
Paused
Commit ·
f5b9919
1
Parent(s): fe9f0b9
fix(3d-model): Resolve pipeline failures and fallback errors
Browse files
models/model_3d_generator.py
CHANGED
|
@@ -113,7 +113,7 @@ class Hunyuan3DGenerator:
|
|
| 113 |
raise # Re-raise the exception to halt execution and see the error
|
| 114 |
|
| 115 |
# 1. Install requirements from the model's specific requirements file
|
| 116 |
-
requirements_path = os.path.join(self.model_path, '
|
| 117 |
if os.path.exists(requirements_path):
|
| 118 |
pip_command = [
|
| 119 |
sys.executable, '-m', 'pip', 'install', '-r', requirements_path,
|
|
@@ -416,14 +416,14 @@ class Hunyuan3DGenerator:
|
|
| 416 |
# Create center vertex
|
| 417 |
center = np.mean(base_vertices, axis=0)
|
| 418 |
base_vertices.append(center)
|
| 419 |
-
center_idx =
|
| 420 |
|
| 421 |
# Create base faces
|
| 422 |
for i in range(len(boundary_indices)):
|
| 423 |
next_i = (i + 1) % len(boundary_indices)
|
| 424 |
base_faces.append([
|
| 425 |
-
|
| 426 |
-
|
| 427 |
center_idx
|
| 428 |
])
|
| 429 |
|
|
|
|
| 113 |
raise # Re-raise the exception to halt execution and see the error
|
| 114 |
|
| 115 |
# 1. Install requirements from the model's specific requirements file
|
| 116 |
+
requirements_path = os.path.join(self.model_path, 'requirements_hunyuan3d.txt')
|
| 117 |
if os.path.exists(requirements_path):
|
| 118 |
pip_command = [
|
| 119 |
sys.executable, '-m', 'pip', 'install', '-r', requirements_path,
|
|
|
|
| 416 |
# Create center vertex
|
| 417 |
center = np.mean(base_vertices, axis=0)
|
| 418 |
base_vertices.append(center)
|
| 419 |
+
center_idx = len(base_vertices) - 1
|
| 420 |
|
| 421 |
# Create base faces
|
| 422 |
for i in range(len(boundary_indices)):
|
| 423 |
next_i = (i + 1) % len(boundary_indices)
|
| 424 |
base_faces.append([
|
| 425 |
+
i,
|
| 426 |
+
next_i,
|
| 427 |
center_idx
|
| 428 |
])
|
| 429 |
|