Skip to content

A docker container for 3D development with ComfyUI

Notifications You must be signed in to change notification settings

michaelgold/comfy3d

Repository files navigation

Comfy3D

Comfy3D is a GPU-accelerated containerized environment for advanced 3D workflows using ComfyUI, enhanced with real-time diffusion models like Hunyuan3D, FLUX, and various 3D/ControlNet extensions.

This setup provides out-of-the-box workflows for image generation, video generation, textured meshes, and multi-view renders, all within a reproducible and customizable Docker environment.

Docker containers are deployed to https://hub.docker.com/r/michaelgold/comfy3d

ComfyUI Trellis Image to Mesh Workflow


Running

You can easily spin up instances of this Docker container on Runpod

Deploy on Runpod Deploy on Runpod

✨ Features

  • 📦 Prebuilt Docker Environment with CUDA 12.1 and 12.6 support
  • 🧱 Custom Nodes:
  • 🧠 Included Models:
    • Tencent's Hunyuan3D-2 (hy3dgen)
    • Flux Dev and Flux Kontext
    • Wan 2.2 (Video)
    • QWEN Image and QWEN Image Edit
    • Comfy 3D Pack
  • 🧪 Ready-to-use workflows for:
    • Character generation (characeter_flux.json)
    • 3D mesh reconstruction (hy3d.json)
    • Multi-view + texture baking (hy3d_multiview.json)

🐳 Getting Started

Prerequisites

  • Docker with NVIDIA GPU support
  • NVIDIA GPU with CUDA >= 12.1
  • (Optional) VS Code with Dev Containers support

🏗️ Build & Run Locally

Development (hot-reload, volumes mapped):

docker compose -f docker-compose.dev.yml up --build

Production:

docker compose up -d

The app runs at http://localhost:8188

🧬 Structure

├── Docker/                   # Dockerfile and build logic
├── .devcontainer/            # VS Code container dev config
├── workflows/                # JSON workflows for ComfyUI
├── input/                    # Sample input images
├── output/                   # Output directory (mounted)
├── utils/
│   └── init.sh               # Container entrypoint
├── docker-compose.yml        # Production stack
├── docker-compose.dev.yml    # Development stack
└── docker-compose.studio.yml # Studio workstation stack

🧠 Models

The following models can be downloaded at runtime with the included ComfyUI-HF-Model-Downloader addon:

  • Hunyuan3D-2 Turbo: tencent/Hunyuan3D-2
  • ControlNet/FLUX Models (via mounted models/ folder)

🧪 Sample Workflows

  1. Character Sheet (Flux) workflows/characeter_flux.json

Generates a 1980s video game-style wrestler character from a single image and prompt using FLUX guidance.

  1. Single-view Mesh (hy3d.json) From 1 image (e.g., wrestler-front.png), generates a textured GLB mesh and multiview renders.

  2. Multi-view Mesh (hy3d_multiview.json) From 4 directional views, generates consistent textured 3D mesh with advanced postprocessing and export.

🛠️ VS Code Dev Container

If using VS Code:

Open in container (Dev Containers extension)

Auto-runs utils/init.sh

Installs ComfyUI, custom nodes, and all Python deps in a virtualenv

📤 Output

All images and GLB files are saved to the output/ directory, which is volume-mounted and shared across builds.

📜 License

MIT License. Third-party model licenses may apply.

📬 Contact

Maintained by @michaelgold For issues or ideas, please open an Issue.

About

A docker container for 3D development with ComfyUI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published