ComfyUI Extension: ComfyUI-BespokeAI-3D
ComfyUI custom nodes for BespokeAI image-to-3D generation NOTE: The files in the repo are not organized.
Custom Nodes (0)
README
🎯 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.
<p align="center"> <img src="assets/workflow-demo.gif" alt="Workflow Demo" width="80%"> </p>✨ 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
- Download and install ComfyUI from comfy.org/download
- 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
- Download the latest release
- Extract to
ComfyUI/custom_nodes/ - Install dependencies:
pip install -r requirements.txt - 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
- Visit bespokeai.build
- Create an account or sign in
- Navigate to Settings → API
- Generate your API key (starts with
bspk_)
💡 Tip: Keep your API key secure and never commit it to version control!
🚀 Quick Start
- Add a Load Image node
- Add BespokeAI 3D Generation node (found in
BespokeAI/3D) - Connect the image output to the node
- Enter your API key
- Configure options and run!
🧩 Nodes
BespokeAI 3D Generation
The main node for converting ComfyUI images to 3D models.
<details> <summary><strong>📥 Inputs</strong></summary>| 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 |
| 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.
<details> <summary><strong>📥 Inputs</strong></summary>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
<p align="center">
<img src="assets/workflow-example.png" alt="Workflow Example" width="100%">
</p>
The screenshot above shows the correct node setup:
- Load Image (Charger Image) - Load your source image
- BespokeAI 3D Generation - Connect the image, enter your API key, and configure options
- 3D Preview (Aperçu 3D) - Connect the
mesh_pathoutput to preview the generated 3D model
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
<details> <summary><strong>❌ "Invalid API key" error</strong></summary>- Verify your API key starts with
bspk_ - Check that the key hasn't been revoked
- Ensure no extra spaces in the key field
- Add more credits at bespokeai.build
- Disable optional features to reduce credit usage
- Check your current balance in the dashboard
- Wait 1 minute before retrying
- Rate limit: 20 requests per minute
- Consider batching requests with delays
- Segmentation only works with 500k resolution
- The node automatically switches to 500k when enabled
- Check console for warnings
- 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.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🔗 Links
- BespokeAI Website: bespokeai.build
- ComfyUI: github.com/comfyanonymous/ComfyUI
- Issues & Support: GitHub Issues
<p align="center"> Made with ❤️ by <a href="https://github.com/SofianeAlla">Sofiane</a> • <a href="https://bespokeai.build">BespokeAI</a> </p>