Spaces:
Running
on
Zero
Running
on
Zero
Update hy3dgen/shapegen/pipelines.py
Browse files
hy3dgen/shapegen/pipelines.py
CHANGED
@@ -213,10 +213,13 @@ class Hunyuan3DDiTPipeline:
|
|
213 |
base_dir = os.environ.get('HY3DGEN_MODELS', '~/.cache/hy3dgen')
|
214 |
model_path = os.path.expanduser(os.path.join(base_dir, model_path, 'hunyuan3d-dit-v2-0'))
|
215 |
if not os.path.exists(model_path):
|
|
|
216 |
try:
|
217 |
import huggingface_hub
|
218 |
-
|
219 |
-
|
|
|
|
|
220 |
model_path = os.path.join(path, 'hunyuan3d-dit-v2-0')
|
221 |
except ImportError:
|
222 |
logger.warning(
|
|
|
213 |
base_dir = os.environ.get('HY3DGEN_MODELS', '~/.cache/hy3dgen')
|
214 |
model_path = os.path.expanduser(os.path.join(base_dir, model_path, 'hunyuan3d-dit-v2-0'))
|
215 |
if not os.path.exists(model_path):
|
216 |
+
|
217 |
try:
|
218 |
import huggingface_hub
|
219 |
+
path = snapshot_download(
|
220 |
+
repo_id=original_model_path,
|
221 |
+
allow_patterns=[f"hunyuan3d-dit-v2-0/*"], # 关键修改:模式匹配子文件夹
|
222 |
+
)
|
223 |
model_path = os.path.join(path, 'hunyuan3d-dit-v2-0')
|
224 |
except ImportError:
|
225 |
logger.warning(
|