A ComfyUI plugin based on UltraShape 1.0 for image-guided 3D mesh refinement.
cd ComfyUI/custom_nodes/ComfyUI-UltraShape1
pip install -r requirements.txt
Place model weights in ComfyUI's models directory:
ComfyUI/
└── models/
└── UltraShape/
└── ultrashape_v1.pt
Download from the HuggingFace https://huggingface.co/infinith/UltraShape/tree/main.
Place coarse meshes in ComfyUI's input directory:
ComfyUI/
└── input/
└── your_coarse_mesh.glb # or .obj, .ply, .stl
Load UltraShape refinement model (VAE + DiT + Conditioner).
| Parameter | Description |
|---|---|
| checkpoint | Select checkpoint file from models/UltraShape/ |
| config | Config file (default: infer_dit_refine.yaml) |
| dtype | Model precision: float16 / bfloat16 / float32 |
| low_vram | Enable low VRAM mode - offload model components to CPU when not in use |
File upload widget for selecting mesh files.
| Parameter | Description |
|---|---|
| mesh | File upload widget - click to upload mesh file |
Supported formats: GLB, GLTF, OBJ, PLY, STL
Load and preprocess coarse mesh for refinement.
| Parameter | Description |
|---|---|
| model | Model from Load Model node |
| mesh_path | Path to mesh file (supports multiple formats - see below) |
| normalize_scale | Mesh normalization scale (default: 0.99) |
| num_sharp_points | Number of sharp edge sample points |
| num_uniform_points | Number of uniform sample points |
| num_latents | Number of latent tokens (default: 768, higher = more detail) |
Mesh Path Formats:
C:\path\to\mesh.glb or /path/to/mesh.glbinput/mesh.glb or just mesh.glb (auto-searches in input folder)output/mesh.glbCore refinement node - refine coarse mesh using image guidance.
| Parameter | Description |
|---|---|
| model | Model from Load Model node |
| coarse_mesh | Mesh from Load Coarse Mesh node |
| image | Reference image (IMAGE type) |
| steps | Diffusion steps (default: 50) |
| guidance_scale | Image guidance scale (default: 5.0) |
| octree_resolution | Output mesh resolution (default: 384) |
| mc_level | Marching cubes level (default: 0.0) |
| box_v | Bounding box scale (default: 1.0) |
| seed | Random seed |
| remove_bg | Remove image background before processing |
| num_chunks | Number of chunks for processing (default: 1, higher = less VRAM) |
VRAM Optimization Tips:
num_chunks to reduce VRAM usage during refinementlow_vram in Load Model nodeoctree_resolutionVRAM Estimates for octree_resolution:
| Resolution | Approx. VRAM |
|---|---|
| 384 | ~8GB |
| 512 | ~16GB |
| 768 | ~32GB |
| 1024 | ~48GB+ |
Save refined mesh to file.
| Parameter | Description |
|---|---|
| refined_mesh | Mesh from Refine node |
| output_dir | Output subdirectory (default: ultrashape_output) |
| filename_prefix | Output filename prefix |
| file_format | Export format: glb / obj / ply / stl |
[Load Image] ──────────────────────────────────────────────────────────┐
│
[UltraShape Load Model] ──┬──> [UltraShape Load Coarse Mesh] ──────────┴──> [UltraShape Refine] ──> [UltraShape Save GLB/OBJ]
│ ↑
│ [UltraShape Mesh Selector] (file upload)
[UltraShape Mesh Selector] ──> mesh_path ──> [UltraShape Load Coarse Mesh]
low_vram in UltraShape Load Modelnum_chunks to 2-4 in UltraShape Refineoctree_resolution to 384 or lowerVRAM Requirements:
Input Requirements:
Optional Dependencies:
cubvh: CUDA-accelerated marching cubes (falls back to skimage if not installed)flash_attn: Flash Attention (falls back to PyTorch SDPA if not installed)pymeshlab: Mesh post-processing (optional features disabled if not installed)Supported Mesh Formats:
low_vram in Load Model nodenum_chunks in Refine node (try 2-4)octree_resolution (try 384 or 256)bfloat16 or float16 dtypecubvh: Optional, will use slower CPU marching cubesflash_attn: Optional, will use PyTorch SDPApymeshlab: Optional, mesh post-processing will be skippedPlease refer to the UltraShape 1.0 original project license.
316 followers · starred Jan 2026
A ComfyUI plugin based on UltraShape 1.0 for image-guided 3D mesh refinement.
cd ComfyUI/custom_nodes/ComfyUI-UltraShape1
pip install -r requirements.txt
Place model weights in ComfyUI's models directory:
ComfyUI/
└── models/
└── UltraShape/
└── ultrashape_v1.pt
Download from the HuggingFace https://huggingface.co/infinith/UltraShape/tree/main.
Place coarse meshes in ComfyUI's input directory:
ComfyUI/
└── input/
└── your_coarse_mesh.glb # or .obj, .ply, .stl
Load UltraShape refinement model (VAE + DiT + Conditioner).
| Parameter | Description |
|---|---|
| checkpoint | Select checkpoint file from models/UltraShape/ |
| config | Config file (default: infer_dit_refine.yaml) |
| dtype | Model precision: float16 / bfloat16 / float32 |
| low_vram | Enable low VRAM mode - offload model components to CPU when not in use |
File upload widget for selecting mesh files.
| Parameter | Description |
|---|---|
| mesh | File upload widget - click to upload mesh file |
Supported formats: GLB, GLTF, OBJ, PLY, STL
Load and preprocess coarse mesh for refinement.
| Parameter | Description |
|---|---|
| model | Model from Load Model node |
| mesh_path | Path to mesh file (supports multiple formats - see below) |
| normalize_scale | Mesh normalization scale (default: 0.99) |
| num_sharp_points | Number of sharp edge sample points |
| num_uniform_points | Number of uniform sample points |
| num_latents | Number of latent tokens (default: 768, higher = more detail) |
Mesh Path Formats:
C:\path\to\mesh.glb or /path/to/mesh.glbinput/mesh.glb or just mesh.glb (auto-searches in input folder)output/mesh.glbCore refinement node - refine coarse mesh using image guidance.
| Parameter | Description |
|---|---|
| model | Model from Load Model node |
| coarse_mesh | Mesh from Load Coarse Mesh node |
| image | Reference image (IMAGE type) |
| steps | Diffusion steps (default: 50) |
| guidance_scale | Image guidance scale (default: 5.0) |
| octree_resolution | Output mesh resolution (default: 384) |
| mc_level | Marching cubes level (default: 0.0) |
| box_v | Bounding box scale (default: 1.0) |
| seed | Random seed |
| remove_bg | Remove image background before processing |
| num_chunks | Number of chunks for processing (default: 1, higher = less VRAM) |
VRAM Optimization Tips:
num_chunks to reduce VRAM usage during refinementlow_vram in Load Model nodeoctree_resolutionVRAM Estimates for octree_resolution:
| Resolution | Approx. VRAM |
|---|---|
| 384 | ~8GB |
| 512 | ~16GB |
| 768 | ~32GB |
| 1024 | ~48GB+ |
Save refined mesh to file.
| Parameter | Description |
|---|---|
| refined_mesh | Mesh from Refine node |
| output_dir | Output subdirectory (default: ultrashape_output) |
| filename_prefix | Output filename prefix |
| file_format | Export format: glb / obj / ply / stl |
[Load Image] ──────────────────────────────────────────────────────────┐
│
[UltraShape Load Model] ──┬──> [UltraShape Load Coarse Mesh] ──────────┴──> [UltraShape Refine] ──> [UltraShape Save GLB/OBJ]
│ ↑
│ [UltraShape Mesh Selector] (file upload)
[UltraShape Mesh Selector] ──> mesh_path ──> [UltraShape Load Coarse Mesh]
low_vram in UltraShape Load Modelnum_chunks to 2-4 in UltraShape Refineoctree_resolution to 384 or lowerVRAM Requirements:
Input Requirements:
Optional Dependencies:
cubvh: CUDA-accelerated marching cubes (falls back to skimage if not installed)flash_attn: Flash Attention (falls back to PyTorch SDPA if not installed)pymeshlab: Mesh post-processing (optional features disabled if not installed)Supported Mesh Formats:
low_vram in Load Model nodenum_chunks in Refine node (try 2-4)octree_resolution (try 384 or 256)bfloat16 or float16 dtypecubvh: Optional, will use slower CPU marching cubesflash_attn: Optional, will use PyTorch SDPApymeshlab: Optional, mesh post-processing will be skippedPlease refer to the UltraShape 1.0 original project license.
316 followers · starred Jan 2026