Setup Guide

📘 Server Setup Guide for Self-Hosting

Option 1: Local Server (on your own machine)

Prerequisites: NVIDIA GPU with 24+ GB VRAM (RTX 3090/4090/A5000)

# 1. Install Kimodo
git clone https://github.com/nv-tlabs/kimodo.git
cd kimodo
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -e .

# 2. Download the LLM2Vec model
huggingface-cli login  # Need access to meta-llama/Meta-Llama-3-8B-Instruct
python -c "
from huggingface_hub import snapshot_download
snapshot_download('Aero-Ex/KIMODO-Meta3_llm2vec_NF4', local_dir='./llm2vec-model')
"

# 3. Create http_server.py (see below)

# 4. Run the server
python http_server.py

Option 2: RunPod Cloud Server

Prerequisites: RunPod account, NVIDIA GPU (any with 24+ GB VRAM)

# 1. Deploy a pod with PyTorch template (RTX 4090 recommended)

# 2. In Jupyter Terminal, run:
cd /workspace
git clone https://github.com/nv-tlabs/kimodo.git
cd kimodo
python -m venv venv
source venv/bin/activate
pip install -e .
pip install flask requests

# 3. Create http_server.py (see below)

# 4. Run the server
python http_server.py

# 5. Expose HTTP port 5000 in pod settings
#    Your public URL will be: https://<pod_id>-5000.proxy.runpod.net

📄 The http_server.py File

Save this as http_server.py in your kimodo folder:

from flask import Flask, request, send_file
import requests
import tempfile
import os
import json

app = Flask(__name__)
KIMODO_URL = "http://localhost:5000/generate"  # Internal Kimodo endpoint

@app.route('/generate', methods=['POST'])
def generate():
    data = request.json
    prompt = data.get('prompt', 'walking')
    duration = data.get('duration', 3.0)
    
    # Forward request to Kimodo
    resp = requests.post(KIMODO_URL, json={
        "prompt": prompt,
        "duration": duration,
        "output_format": "bvh"
    }, timeout=120)
    
    # Save to temp file
    with tempfile.NamedTemporaryFile(suffix='.bvh', delete=False) as f:
        f.write(resp.content)
        bvh_path = f.name
    
    return send_file(bvh_path, as_attachment=True, download_name='motion.bvh')

@app.route('/health', methods=['GET'])
def health():
    return {"status": "ok", "fps": 30}

if __name__ == '__main__':
    print("🚀 Server running on http://0.0.0.0:5001")
    print("   Endpoint: POST /generate")
    print("   Health: GET /health")
    app.run(host='0.0.0.0', port=5001, debug=False)

🔧 Connecting to Your Server

Once your server is running:

  1. Find your server URL:
    • Local: http://localhost:5001/generate
    • RunPod: https://<pod_id>-5001.proxy.runpod.net/generate
    • VPS: http://your-ip:5001/generate
  2. In Blender Rigger addon settings:
    Set Server IP to your URL (omit /generate)
  3. Test the connection:
    Click Test Connection button in the addon panel

🔑 SSH Setup (for Remote Server Mode)

If you’re using local server, you can skip this section.
Only needed if you run your own remote server (RunPod/VPS).

Quick Setup (5 minutes)

1. Generate SSH key on your computer:

ssh-keygen -t ed25519 -C "your@email.com"
# Press Enter for all questions (no password)

2. Copy your public key:

cat ~/.ssh/id_ed25519.pub

3. Add the key to your server:

  • RunPod: Paste key in User Settings → SSH Public Keys
  • VPS: Run echo "your-key-here" >> ~/.ssh/authorized_keys

4. Test connection:

ssh -p <port> root@<server-ip>

Addon Settings

In Blender Rigger addon:

  • Server IP: 213.173.107.32 (example)
  • SSH Port: 12304 (example)
  • Username: root