BladeSzaSza commited on
Commit
48809ea
·
1 Parent(s): ba972b4

fixed the requiriments

Browse files
models/model_3d_generator.py CHANGED
@@ -127,7 +127,12 @@ class Hunyuan3DGenerator:
127
  ]
128
  run_setup_command(pip_command, cwd=self.model_path)
129
 
130
- # 2. Install custom rasterizer
 
 
 
 
 
131
  rasterizer_path = os.path.join(self.model_path, 'hy3dpaint', 'packages', 'custom_rasterizer')
132
  if os.path.exists(rasterizer_path):
133
  pip_command_rasterizer = [sys.executable, '-m', 'pip', 'install', '-e', '.']
 
127
  ]
128
  run_setup_command(pip_command, cwd=self.model_path)
129
 
130
+ # 2. Install custom rasterizer dependencies (torch)
131
+ logger.info("Installing torch, torchvision, torchaudio...")
132
+ pip_command_torch = [sys.executable, '-m', 'pip', 'install', 'torch==2.5.1', 'torchvision==0.20.1', 'torchaudio==2.5.1', '--index-url', 'https://download.pytorch.org/whl/cu124']
133
+ run_setup_command(pip_command_torch, cwd=self.model_path)
134
+
135
+ # 3. Install custom rasterizer
136
  rasterizer_path = os.path.join(self.model_path, 'hy3dpaint', 'packages', 'custom_rasterizer')
137
  if os.path.exists(rasterizer_path):
138
  pip_command_rasterizer = [sys.executable, '-m', 'pip', 'install', '-e', '.']
requirements.txt CHANGED
@@ -3,9 +3,9 @@ gradio>=4.16.0
3
  spaces>=0.19.0
4
 
5
  # AI/ML frameworks
6
- torch>=2.1.0
7
- torchvision>=0.16.0
8
- torchaudio>=2.1.0
9
  transformers>=4.36.0
10
  diffusers>=0.24.0
11
  accelerate>=0.25.0
 
3
  spaces>=0.19.0
4
 
5
  # AI/ML frameworks
6
+ torch>=2.5.1
7
+ torchvision>=0.20.1
8
+ torchaudio>=2.5.1
9
  transformers>=4.36.0
10
  diffusers>=0.24.0
11
  accelerate>=0.25.0
requirements_hunyuan3d.txt CHANGED
@@ -1,37 +1,67 @@
1
- # Additional requirements for Hunyuan3D-2.1 support
2
- # Install these in addition to the main requirements.txt
3
-
4
- # Hunyuan3D specific dependencies
5
- # Note: The hy3dshape and hy3dpaint modules need to be installed from the Hunyuan3D repository
6
- # git clone https://huggingface.co/spaces/tencent/Hunyuan3D-2.1
7
- # Then copy the hy3dshape and hy3dpaint folders to your project
8
-
9
- # Core dependencies that Hunyuan3D uses
10
- trimesh>=3.23.5
11
- pygltflib>=1.16.1
12
- scikit-image>=0.22.0
13
- opencv-python>=4.8.0
14
- Pillow>=10.0.0
15
- numpy>=1.24.0
16
- torch>=2.0.0
17
- torchvision>=0.15.0
18
- transformers>=4.35.0
19
- diffusers>=0.25.0
20
- accelerate>=0.25.0
21
- safetensors>=0.4.0
22
- huggingface-hub>=0.19.0
23
- spaces>=0.19.0
24
-
25
- # For background removal
26
- rembg>=2.0.50
27
-
28
- # For 3D visualization and processing
29
- pymeshlab>=2022.2.post3
30
- open3d>=0.17.0
31
-
32
- # Optional: For mesh optimization
33
- xatlas>=0.0.7
34
- pyvista>=0.42.0
35
-
36
- # Note: Some dependencies might require specific versions or CUDA compatibility
37
- # Adjust versions based on your system configuration
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ --extra-index-url https://mirrors.cloud.tencent.com/pypi/simple/
2
+ --extra-index-url https://mirrors.aliyun.com/pypi/simple
3
+
4
+ # Build Tools
5
+ ninja==1.11.1.1
6
+ pybind11==2.13.4
7
+
8
+ # Core ML/Deep Learning
9
+ transformers==4.46.0
10
+ diffusers==0.30.0
11
+ accelerate==1.1.1
12
+ pytorch-lightning==1.9.5
13
+ huggingface-hub==0.30.2
14
+ safetensors==0.4.4
15
+
16
+ # Scientific Computing
17
+ numpy==1.24.4
18
+ scipy==1.14.1
19
+ einops==0.8.0
20
+ pandas==2.2.2
21
+
22
+ # Computer Vision & Image Processing
23
+ opencv-python==4.10.0.84
24
+ imageio==2.36.0
25
+ scikit-image==0.24.0
26
+ rembg==2.0.65
27
+ realesrgan==0.3.0
28
+ tb_nightly==2.18.0a20240726
29
+ basicsr==1.4.2
30
+
31
+ # 3D Mesh Processing
32
+ trimesh==4.4.7
33
+ pymeshlab==2022.2.post3
34
+ pygltflib==1.16.3
35
+ xatlas==0.0.9
36
+ open3d==0.18.0
37
+
38
+ # Configuration Management
39
+ omegaconf==2.3.0
40
+ pyyaml==6.0.2
41
+ configargparse==1.7
42
+
43
+ # Web Framework (for demo)
44
+ gradio==5.33.0
45
+ fastapi==0.115.12
46
+ uvicorn==0.34.3
47
+
48
+ # Utilities
49
+ tqdm==4.66.5
50
+ psutil==6.0.0
51
+
52
+ # GPU Computing (requires CUDA)
53
+ cupy-cuda12x==13.4.1
54
+
55
+ # Blender
56
+ bpy==4.0
57
+
58
+ # ONNX Runtime
59
+ onnxruntime==1.16.3
60
+ torchmetrics==1.6.0
61
+
62
+ pydantic==2.10.6
63
+
64
+ timm
65
+ pythreejs
66
+ torchdiffeq
67
+ deepspeed