BespokeAI 3D Generation for ComfyUI

ComfyUI-BespokeAI-3D

Transform images into 3D models with AI-powered generation

Stars Forks Issues License

BespokeAI ComfyUI Python

Features • Installation • Quick Start • Nodes • Examples • Pricing


🎯 Overview

ComfyUI-BespokeAI-3D brings the power of BespokeAI's image-to-3D generation directly into your ComfyUI workflows. Generate high-quality 3D models (GLB/OBJ) from any image with AI enhancement, PBR textures, and automatic part segmentation.

Workflow Demo

✨ Features

Feature Description
🖼️ Image to 3D Convert any image into a detailed 3D model
🎨 AI Enhancement Automatic photorealistic enhancement of input images
🌟 PBR Textures Generate models with physically-based rendering textures
📐 Multiple Resolutions Choose from 500K, 1M, or 1.5M polygons
🔷 Low Poly Mode Create optimized game-ready models
🧩 Part Segmentation Automatic segmentation of 3D model components
⚡ Async Processing Non-blocking generation with progress tracking

📦 Installation

Prerequisites

  1. Download and install ComfyUI from comfy.org/download
  2. Launch ComfyUI at least once to initialize the directory structure

Method 1: Git Clone

cd ComfyUI/custom_nodes
git clone https://github.com/SofianeAlla/ComfyUI-BespokeAI-3D.git
cd ComfyUI-BespokeAI-3D
pip install -r requirements.txt

Method 2: Download ZIP

  1. Download the latest release
  2. Extract to ComfyUI/custom_nodes/
  3. Install dependencies: pip install -r requirements.txt
  4. Restart ComfyUI

Required Companion Nodes

This node works with the following built-in ComfyUI nodes:

  • Load Image (Charger Image) - To provide image input to the 3D generation node
  • 3D Preview (Aperçu 3D) - To preview the generated 3D model directly in ComfyUI

🔑 Getting Your API Key

  1. Visit bespokeai.build
  2. Create an account or sign in
  3. Navigate to Settings → API
  4. Generate your API key (starts with bspk_)

💡 Tip: Keep your API key secure and never commit it to version control!

🚀 Quick Start

  1. Add a Load Image node
  2. Add BespokeAI 3D Generation node (found in BespokeAI/3D)
  3. Connect the image output to the node
  4. Enter your API key
  5. Configure options and run!

Quick Start Workflow

🧩 Nodes

BespokeAI 3D Generation

The main node for converting ComfyUI images to 3D models.

📥 Inputs
Input Type Required Description
image IMAGE ✅ ComfyUI image input
api_key STRING ✅ Your BespokeAI API key
resolution ENUM ✅ Polygon count: 500k, 1m, 1.5m
with_texture BOOLEAN ✅ Enable PBR textures
ai_enhancement BOOLEAN ✅ AI photorealistic enhancement
low_poly BOOLEAN ❌ Low poly optimization mode
segmentation BOOLEAN ❌ Part segmentation (500k only)
prompt STRING ❌ Custom prompt for AI enhancement
poll_interval FLOAT ❌ Polling interval in seconds
max_poll_attempts INT ❌ Maximum polling attempts
📤 Outputs
Output Type Description
glb_path STRING Local path to downloaded GLB file
obj_path STRING Local path to downloaded OBJ file
model_url STRING Direct URL to 3D model
enhanced_image_url STRING URL of AI-enhanced input image
credits_used INT Credits consumed for this generation

BespokeAI 3D Generation (URL)

Alternative node that accepts an image URL directly.

📥 Inputs

Same as above, but replaces image with:

Input Type Required Description
image_url STRING ✅ Direct URL to an image

📸 Examples

Basic Image to 3D

Load Image → BespokeAI 3D Generation → 3D Preview

Workflow Example

The screenshot above shows the correct node setup:

  1. Load Image (Charger Image) - Load your source image
  2. BespokeAI 3D Generation - Connect the image, enter your API key, and configure options
  3. 3D Preview (Aperçu 3D) - Connect the mesh_path output to preview the generated 3D model

Basic Example

With AI Enhancement + Segmentation

Load Image → BespokeAI 3D Generation → Save GLB
                    ↓
            Resolution: 500k
            AI Enhancement: ✓
            Segmentation: ✓

Batch Processing Workflow

Load Image Batch → Loop → BespokeAI 3D Generation → Collect → Save All

💰 Pricing

Feature Credits
Base 3D Generation 10
AI Enhancement +2
Low Poly Mode +5
Part Segmentation +6

Total range: 12-23 credits per generation

Get credits at bespokeai.build

📁 Output Location

Generated 3D models are automatically saved to:

ComfyUI/
└── output/
    └── bespokeai_3d/
        ├── model_1699999999.glb
        └── model_1699999999.obj

⚠️ Troubleshooting

❌ "Invalid API key" error
  • Verify your API key starts with bspk_
  • Check that the key hasn't been revoked
  • Ensure no extra spaces in the key field
❌ "Insufficient credits" error
  • Add more credits at bespokeai.build
  • Disable optional features to reduce credit usage
  • Check your current balance in the dashboard
❌ "Rate limit exceeded" error
  • Wait 1 minute before retrying
  • Rate limit: 20 requests per minute
  • Consider batching requests with delays
❌ Segmentation not working
  • Segmentation only works with 500k resolution
  • The node automatically switches to 500k when enabled
  • Check console for warnings
❌ Generation timeout
  • Increase max_poll_attempts (default: 120)
  • Check your internet connection
  • Complex images may take longer to process
  • Try with a simpler/cleaner input image

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with ❤️ by Sofiane • BespokeAI

S
Description
No description provided
Readme MIT
496 KiB
Languages
Python 58.2%
JavaScript 41.8%