Repository navigation
TRELLIS.2 Node Upgrade, Multi-Color 3D Printing, Folder Batching & Modularization
StableGen v0.3.1: TRELLIS.2 Node Upgrade, Multi-Color 3D Printing, Folder Batching & Modularization
Welcome to StableGen v0.3.1! This release upgrades our core Image-to-3D backend to the new TRELLIS.2 node version, introduces a physical multi-color 3D printing & slicing suite, adds batch folder processing, expands the DAE model texturing pipeline, and modularizes the addon architecture for better maintenance.
Important
Upgrade Action Required: To avoid workspace conflicts and startup failures, you must manually delete the old ComfyUI-TRELLIS2 and ComfyUI-Geometrypack directories from your ComfyUI custom_nodes/ directory prior to running this version.
After deleting them, run installer.py (selecting Option 8) or follow the manual instructions to install the updated TRELLIS.2 nodes.
Blender Compatibility: StableGen v0.3.1 fully supports Blender 4.2 - 4.5 (using OSL shaders) and Blender 5.1+ (using native Raycast nodes with GPU acceleration). Blender 5.0 remains explicitly unsupported.
✨ What's New in v0.3.1:
- 🔥 Upgraded TRELLIS.2 Model & Node Pipeline
- 🧪 Experimental: 3D Printing & Slicing Suite
- 📂 Folder Batching for Image-to-3D
- 📦 DAE Import & Texturing Pipeline
- 📷 Auto-Aspect Camera Framing Operator
- 🧩 Modular Package Refactoring
- 🐞 Queue & ControlNet Bug Fixes (Data Loss Prevention)
- ⚡ Installer & Platform Isolation Patches
🔥 Upgraded TRELLIS.2 Model & Node Pipeline
The headline feature of v0.3.1 is the migration to the official upstream PozzettiAndrea/ComfyUI-TRELLIS2 custom node suite. This replaces the old custom fork and introduces a native ComfyUI data representation pipeline:
- Native ComfyUI Data Pipeline: Shifted from file-based intermediate storage (which previously saved voxelgrids to disk and loaded them in a monolithic exporter) to passing native ComfyUI datatypes (
trimesh,voxelgrid,shape_slat,subs) directly between nodes. - De-monolithized Modular Nodes: The monolithic
Trellis2ExportGLBnode is now decomposed into dedicated, native ComfyUI processing steps:Trellis2ProcessMeshhandles mesh extraction, welding, decimation, and remeshing.Trellis2RasterizePBRmanages PBR material texturing and UV rasterization.Trellis2ExportTrimeshhandles exporting the processed trimesh structure to GLB.
This allows ComfyUI to cache intermediate steps and provides fine-grained control over mesh generation phases.
- Client-Side Alpha Rasterization: Resolves a known issue where transparent PNGs with garbage RGB values behind transparent pixels corrupted TRELLIS.2 conditioning (since DinoV3 reads raw RGB rather than premultiplied alpha). When BG removal is set to Skip, StableGen automatically flattens the image onto the configured background color client-side before upload, while preserving the alpha mask for downstream masking.
- VRAM Leak Reduction: Built-in DinoV3 background culling (
torch.no_grad()+.detach()) andcomfy-envregistry cleanup patches applied via our installer save between 5 to 9 GB of VRAM during active generations. - New Post-Processing Settings:
- Decimation Methods: Choose between Server-Side QEM (simplified on the ComfyUI server), local Collapse Decimate (adaptive decimation locally in Blender using a QEM solver), or None (Raw) to preserve the raw high-poly trimesh details.
- Remesh/Retopo Methods: Exposes options for QDC (Server) (uniform Quad Dual Contouring remeshing), local Quadriflow (curvature-adaptive quad retopology inside Blender, marked as experimental), or None (Trimesh) to keep the raw triangle geometry.
- Solidify Mesh: Optional cap-and-hollow method that deletes internal geometry to conserve UV and texture space.
- Manual Local Post-Processing: Added a Run Local Post-Processing operator to easily re-run decimation, solidification, and Quadriflow retopology on the active mesh at any point after import.
- Better progress bar handling: The progress bar within StableGen's panel now more accurately reflects the TRELLIS.2 pipeline.
- Cancellation handling: You should now be able to cancel the TRELLIS.2 generation at any point directly from Blender.
- Stability, reliability and speed improvements: The new version of the ComfyUI-TRELLIS.2 node makes the mesh generation process more reliable, as VRAM / RAM usage is more consistent across different runs, artifacts do not occur nearly as often, and general generation speed improves.
LEFT: Raw TRELLIS.2 FlexiCubes based mesh (~16M faces), RIGHT: QEM / QDC post-processed mesh (default options, 1M face target)
🧪 Experimental: 3D Printing & Slicing Suite
Important
Activation Required: This feature must be enabled in Blender's Addon Preferences by checking the Enable 3D Print Exporter Tab checkbox.
Warning
Experimental Feature: This suite is currently in an experimental phase.
Export textured assets directly into a multi-color format compatible with OrcaSlicer-FullSpectrum. This should work with any textured meshes in Blender, not just with StableGen generated ones.
-
Physical Color Mixing Solver (Kubelka-Munk Theory): When custom filament colors are loaded (e.g. skin tone), StableGen optimizes mixing by evaluating absorption (
$K$ ) and scattering ($S$ ) coefficients. - One-Sided Saturation-Difference Penalty: Prevents skin pigments from bleeding as dither speckles into vibrant colors, keeping clothes/hair clean.
-
One-Hot Closest Filament Initialization: Initialise optimization weights to
$1.0$ for the closest single filament, avoiding local minima from pigment-poisoning at initialization. -
Vectorized 8% Threshold Pruning: Automatically filters out minor filament demands under
$8%$ , culling noisy single-layer horizontal banding on FDM prints. -
Viewport Slices Preview (
SG_SlicedPreview): Projects and dithers layers onto a temporary preview mesh directly inside the Blender viewport, giving instant visual feedback of physical printing voxels before exporting. -
Slic3r/Bambu/OrcaSlicer Painted Hex Encoding: Implements custom hex-indexing (including the
"C"suffix for extruders$\ge 3$ ) to ensure painted triangles map perfectly to slicer filaments. - Asynchronous Multi-Stage 3MF Export: Moves heavy cylinder raycasting, slicing, and vertex welding onto background threads. Features a live progress bar and Cancel button to keep the Blender UI fluid.
- Print Preset Switcher: Dropdown containing presets for CMYW (Dithered), CMYK (Dithered), Solid Mixes, and Custom palettes to quickly set up common filament spools.
📂 Folder Batching for Image-to-3D
Generate multiple 3D assets in one run by pointing StableGen at a directory of reference images:
- Batch Image-to-3D: StableGen queues and processes every image in the folder automatically.
- Auto-Baking on Completion: Added a "Bake Textures after each model" checkbox with a Bake Settings popup to configure resolution, UV unwrapping, PBR export, ORM packing, normal conventions, and texture flattening for the entire batch.
- Scene Isolation & Bleed Prevention: Automatically hides pre-existing meshes before generating each new model, preventing camera projection and texture baking bleed between assets.
- Dedicated Batch Results Collection: Moves finished meshes to a hidden "Batch Results" collection that auto-reveals only when the entire run completes.
- Automated Cleanup: Automatically purges temporary camera rigs and helper objects after each model is finished.
- Timings & Batch Performance Log: Writes a
stablegen_batch_log.jsonfile to the input folder containing per-model execution durations (Shape, Texture, Bake, and Total time) and success/error status reports. - Unified Cancellation: Replaces individual cancel buttons with a single "Cancel Batch" button to safely abort the entire folder run during any active phase.
📦 DAE Import & Texturing Pipeline
Import and texture batches of legacy DAE (Collada) models:
- SketchUp Collada Optimization: Tailored specifically for SketchUp DAE exports. Includes automated triangle fan fixes and interior face removal to clean up coplanar and self-intersecting internal faces prior to texturing.
- Recursive Directory Traversal: Recursively scans folders, importing and texturing all discovered DAE meshes.
- Full Parameter Parity: Exposes all generation configurations (architectures, prompts, and camera properties) to the DAE import sidebar.
- Progress & Error Logging: Live import progress bar and per-file error tracking in the UI.
📷 Auto-Aspect Camera Framing Operator
Optimize your texturing cameras dynamically without manual positioning:
- Dynamic Aspect & Optimal Framing: Introduces the
apply_auto_aspectoperator to automatically adjust the aspect ratio and focal framing of existing cameras (whether created via the Orbit Ring generator or manually placed). - Parented Camera Matrix Correction: Evaluates world-space matrices (
matrix_world) to ensure parented camera rigs frame the model perfectly regardless of hierarchy or empty target setups.
🧩 Modular Package Refactoring
The addon has been refactored from a monolithic file into a structured Python package conforming to Blender 4.2+ Extension Guidelines:
stablegen/
├── __init__.py # Registration entry point
├── core/ # Package constants, load handlers, preferences, properties, and async state
├── ui/ # UI panels, presets, model units, and scene queue sidebar
├── texturing/ # Texturing pipeline, projections, bakes, and 3D print exporter
├── mesh_gen/ # TRELLIS.2 workflows, generation logic, and batch processing
├── cameras/ # Camera placement, presets, and aspect overlays
└── util/ # Color matching and workflow templates
🐞 Queue & ControlNet Bug Fixes (Data Loss Prevention)
- Gated Queue Reset (Issue #103 Fixed): Previously, resetting a completed queue item (clicking "Reset to Pending" or running
stablegen.queue_invalidate) deleted all mesh/camera objects in the scene. For texturing jobs, this resulted in total loss of the user's source mesh. Cleanup is now gated: it only deletes generated meshes intrellis2mode, leaving texturing meshes, cameras, and lights completely untouched. - ControlNet Selection Preserver (Issue #102 Fixed): Added a persistent
model_name_backupproperty toControlNetUnit. This prevents Blender from resetting the selected model to placeholder values during asynchronous mapping list refreshes on reload. - Compatible Model Sorting: Refactored the ControlNet enum items builder to sort compatible models first (FLUX models sorted first for FLUX pipelines, and SDXL models first for SDXL/Qwen), avoiding
KSamplercrashes from incorrect default model selections. - Toggleable Queue Panel: Added an
enable_scene_queuecheckbox in addon preferences (defaultFalse) to show/hide the Scene Queue sidebar list. Note: To use the scene queue batching features, you must enable this setting in preferences first.
⚡ Installer & Platform Isolation Patches
- comfy-env Isolation Patch: Auto-applies
PYTHONNOUSERSITE = 1patches insidecomfy-envexecution loops. This isolates the ComfyUI Python environment and prevents user-site system libraries from conflicting with custom node packages. - Linux Wheel Normalization: Patched
comfy-envplatform matching logic to correctly identifymanylinux_platform tags, restoring automated dependency downloads on Linux machines. - Resume Download Support: The user-facing
installer.pyscript now supports resuming interrupted downloads.
New Contributors
- @Sulaiman281 made their first contribution in #87
- @srandovnidobrodruzstvi made their first contribution in #96
Full Changelog: v0.3.0...v0.3.1

