Skip to content
BPerjuPublic

About

A flexible 3D model generation prototype web application. Generate 3D models from text or images with built-in image editing and inpainting tools.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

71 Commits

Folders and files

Repository files navigation

Cuy3D

A flexible 3D model generation prototype web application. Generate 3D models from text or images with built-in image editing and inpainting tools.

Demo

Loading gif

RunPod Setup

Step 1: Create Template

Go to RunPod → My Templates → Create Template with these settings:

  • Container Image: docker.io/bperju/hunyuan3d-v2-keepalive:latest
  • Container Disk Size: 25GB
  • Volume Disk Size: 50GB (minimum 30GB)
  • Expose Port: 8081 ⚠️ Important for API access

Click Save Template.

Step 2: Deploy Pod

  1. Go to RunPod → Pods → Deploy
  2. Select a GPU with 20GB+ VRAM (required for textured generation)
  3. Select the template you created in Step 1
  4. Click Deploy

Step 3: Connect to Pod

Once the pod is running, go to Connect. You can use either:

  • Web Terminal (recommended - easier setup)
  • SSH (requires SSH key setup in RunPod settings and on your local machine)

Step 4: Install Dependencies

In the terminal, run these commands:

pip install huggingface_hub
git clone https://github.com/Tencent/Hunyuan3D-2.git
cd Hunyuan3D-2
pip install -r requirements.txt
pip install -e .

# For texture support
cd hy3dgen/texgen/custom_rasterizer
python3 setup.py install
cd ../../..
cd hy3dgen/texgen/differentiable_renderer
python3 setup.py install

Step 5: Start Server

From the /Hunyuan3D-2 directory:

python3 api_server.py --enable_tex &

--enable_tex enables texture generation & runs the server in the background

Wait for:

  • Server startup message: Uvicorn running on http://0.0.0.0:8081
  • Models to download (~5 minutes on first run)

⚠️ Note: If you terminate the pod, you'll need to redo this setup. Keeping it running incurs costs.

Step 6: Get API URL

  1. Go back to the Connect tab
  2. Click the HTTP Service button
  3. Copy the URL (example: https://088xehg2969ge9-8081.proxy.runpod.net/generate)

This is your API endpoint. You can also use /send and /status endpoints.

API Documentation: YOUR_URL/docs

Troubleshooting: If the server fails to start (no uvicorn running at 0.0.0.0:8081 message), kill any existing process and re-run: python3 api_server.py --enable_tex &

⚠️ Important: Update the .env file every time you start a new pod with the new URL.


Cuy3D Setup

Step 1: Environment Variables

Create a .env file in the backend/ directory:

HUNYUAN3D_SYNC_URL=https://[your-pod-id]-8081.proxy.runpod.net/generate
HUNYUAN3D_SEND_URL=https://[your-pod-id]-8081.proxy.runpod.net/send
HUNYUAN3D_STATUS_URL=https://[your-pod-id]-8081.proxy.runpod.net/status
REPLICATE_API_TOKEN=your_token_here

Get a Replicate API token at: https://replicate.com/account/api-tokens

Step 2: Install Dependencies

# Create and activate virtual environment
python -m venv venv
.\venv\Scripts\activate          # Windows
# source venv/bin/activate       # macOS/Linux

# Install Python dependencies
pip install -r requirements.txt

# Install frontend dependencies
cd frontend
npm install
cd ..

Step 3: Run the App

From the root directory:

Windows:

.\start.bat

macOS/Linux:

# Terminal 1 - Backend
cd backend
python manage.py runserver 0.0.0.0:8000

# Terminal 2 - Frontend
cd frontend
npm run dev

Access the app at: http://localhost:5173

About

A flexible 3D model generation prototype web application. Generate 3D models from text or images with built-in image editing and inpainting tools.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages