davideuler/hunyuan-3d-comfy-node

Python

0

0 commits

updated Aug 7, 2025

See the code

README

ComfyUI HunyuanWorld Node

ComfyUI custom node for Tencent's HunyuanWorld-1.0 3D world generation model. Generate stunning panoramas and 3D scenes from text or images.

Features

  • Text to Panorama: Generate 360° panoramic images from text descriptions
  • Image to Panorama: Extend perspective images into complete panoramas
  • 3D Scene Generation: Create layered 3D mesh scenes from panoramas
  • Mesh Export: Export 3D meshes in PLY, OBJ, STL, and Draco formats
  • Dual Mode: Works both as ComfyUI node and standalone Python script

Installation

ComfyUI Installation

  1. Navigate to your ComfyUI custom nodes directory:
cd ComfyUI/custom_nodes
  1. Clone this repository:
git clone https://github.com/yourusername/hunyuan-world-comfy-node.git
cd hunyuan-world-comfy-node
  1. Install dependencies:
pip install torch torchvision numpy pillow transformers diffusers safetensors tqdm requests opencv-python accelerate sentencepiece protobuf
# Optional for mesh support
pip install open3d

Standalone Installation

git clone https://github.com/yourusername/hunyuan-world-comfy-node.git
cd hunyuan-world-comfy-node
pip install -e .

Models

The node uses Tencent's HunyuanWorld-1.0 models from Hugging Face:

Models will be automatically downloaded on first use.

Nodes

HunyuanWorld Text to Panorama

Generate panoramic images from text prompts.

Inputs:

  • prompt: Text description of the scene
  • seed: Random seed for reproducibility
  • width/height: Output dimensions (default: 1920x960)
  • num_inference_steps: Number of denoising steps
  • guidance_scale: Guidance strength

HunyuanWorld Image to Panorama

Convert perspective images to panoramas.

Inputs:

  • image: Input perspective image
  • prompt: Description for panorama extension
  • fov: Field of view of input image
  • Other parameters similar to Text to Panorama

HunyuanWorld Scene Generator

Generate 3D mesh scenes from panoramas.

Inputs:

  • panorama: Input panoramic image
  • classes: Scene type (outdoor/indoor/mixed)
  • labels_fg1/fg2: Objects to segment into layers
  • resolution: Output mesh resolution

HunyuanWorld Mesh Preview

Preview and export generated meshes.

Inputs:

  • mesh_data: Generated mesh data
  • render_mode: Visualization mode

Standalone Usage

Test the nodes without ComfyUI:

# Full pipeline test
python main.py --mode pipeline

# Text to panorama
python main.py --mode text2pano --prompt "A mountain landscape"

# Image to panorama
python main.py --mode image2pano --image path/to/image.jpg

# Scene generation
python main.py --mode scene --panorama path/to/panorama.png

# All tests
python main.py --mode all

Examples

Basic Text to Panorama Workflow

  1. Add "HunyuanWorld Text to Panorama" node
  2. Enter your prompt
  3. Connect to "Preview Image" node
  4. Run workflow

Complete 3D Scene Pipeline

  1. Generate panorama with text/image node
  2. Connect to "HunyuanWorld Scene Generator"
  3. Set foreground labels (e.g., "tree, rock")
  4. Connect to "HunyuanWorld Mesh Preview"
  5. Run workflow to generate 3D meshes

Requirements

  • Python 3.10+
  • CUDA-capable GPU (16GB+ VRAM recommended)
  • PyTorch 2.0+
  • See pyproject.toml for full dependencies

Optional Dependencies

For full mesh support:

pip install open3d trimesh

License

This project follows the Tencent HunyuanWorld-1.0 Community License Agreement. Note: HunyuanWorld is a different model from Hunyuan3D model.

References

Support

For issues and questions, please open an issue on GitHub.

davideuler/hunyuan-3d-comfy-node

Python

0

0 commits

updated Aug 7, 2025

See the code

README

ComfyUI HunyuanWorld Node

ComfyUI custom node for Tencent's HunyuanWorld-1.0 3D world generation model. Generate stunning panoramas and 3D scenes from text or images.

Features

  • Text to Panorama: Generate 360° panoramic images from text descriptions
  • Image to Panorama: Extend perspective images into complete panoramas
  • 3D Scene Generation: Create layered 3D mesh scenes from panoramas
  • Mesh Export: Export 3D meshes in PLY, OBJ, STL, and Draco formats
  • Dual Mode: Works both as ComfyUI node and standalone Python script

Installation

ComfyUI Installation

  1. Navigate to your ComfyUI custom nodes directory:
cd ComfyUI/custom_nodes
  1. Clone this repository:
git clone https://github.com/yourusername/hunyuan-world-comfy-node.git
cd hunyuan-world-comfy-node
  1. Install dependencies:
pip install torch torchvision numpy pillow transformers diffusers safetensors tqdm requests opencv-python accelerate sentencepiece protobuf
# Optional for mesh support
pip install open3d

Standalone Installation

git clone https://github.com/yourusername/hunyuan-world-comfy-node.git
cd hunyuan-world-comfy-node
pip install -e .

Models

The node uses Tencent's HunyuanWorld-1.0 models from Hugging Face:

Models will be automatically downloaded on first use.

Nodes

HunyuanWorld Text to Panorama

Generate panoramic images from text prompts.

Inputs:

  • prompt: Text description of the scene
  • seed: Random seed for reproducibility
  • width/height: Output dimensions (default: 1920x960)
  • num_inference_steps: Number of denoising steps
  • guidance_scale: Guidance strength

HunyuanWorld Image to Panorama

Convert perspective images to panoramas.

Inputs:

  • image: Input perspective image
  • prompt: Description for panorama extension
  • fov: Field of view of input image
  • Other parameters similar to Text to Panorama

HunyuanWorld Scene Generator

Generate 3D mesh scenes from panoramas.

Inputs:

  • panorama: Input panoramic image
  • classes: Scene type (outdoor/indoor/mixed)
  • labels_fg1/fg2: Objects to segment into layers
  • resolution: Output mesh resolution

HunyuanWorld Mesh Preview

Preview and export generated meshes.

Inputs:

  • mesh_data: Generated mesh data
  • render_mode: Visualization mode

Standalone Usage

Test the nodes without ComfyUI:

# Full pipeline test
python main.py --mode pipeline

# Text to panorama
python main.py --mode text2pano --prompt "A mountain landscape"

# Image to panorama
python main.py --mode image2pano --image path/to/image.jpg

# Scene generation
python main.py --mode scene --panorama path/to/panorama.png

# All tests
python main.py --mode all

Examples

Basic Text to Panorama Workflow

  1. Add "HunyuanWorld Text to Panorama" node
  2. Enter your prompt
  3. Connect to "Preview Image" node
  4. Run workflow

Complete 3D Scene Pipeline

  1. Generate panorama with text/image node
  2. Connect to "HunyuanWorld Scene Generator"
  3. Set foreground labels (e.g., "tree, rock")
  4. Connect to "HunyuanWorld Mesh Preview"
  5. Run workflow to generate 3D meshes

Requirements

  • Python 3.10+
  • CUDA-capable GPU (16GB+ VRAM recommended)
  • PyTorch 2.0+
  • See pyproject.toml for full dependencies

Optional Dependencies

For full mesh support:

pip install open3d trimesh

License

This project follows the Tencent HunyuanWorld-1.0 Community License Agreement. Note: HunyuanWorld is a different model from Hunyuan3D model.

References

Support

For issues and questions, please open an issue on GitHub.