Skip to content

BizaNator/ComfyUI-BrainDead

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

75 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ComfyUI-BrainDead

A comprehensive collection of ComfyUI custom nodes for caching, character consistency, and prompt iteration.

🧠 BrainDeadGuild

Don't Be BrAIn Dead Alone

Games | AI | Community

BrainDeadGuild BrainDead.TV

🎯 About BrainDead Nodes

AN interanlly used node pack for Biloxi Studios designed to help with character, story, 3d and audio generation for next generation UGC game and TV pipelines.

Features

Cache Nodes (BrainDead/Cache)

Smart caching with lazy evaluation - upstream nodes are completely SKIPPED when cache is valid.

Node Description
BD Cache Image Cache IMAGE tensors as PNG files
BD Cache Mask Cache MASK tensors as PNG files
BD Cache Latent Cache LATENT tensors as safetensors
BD Cache Audio Cache AUDIO data as WAV files
BD Cache String Cache STRING data as TXT files
BD Cache Any Cache any data type as pickle
BD Cache Mesh Cache TRIMESH objects as PLY files
BD Save File Save any data in native format, output file path
BD Load Image Load image from STRING path
BD Load Mesh Load 3D mesh from STRING path
BD Load Audio Load audio from STRING path
BD Load Text Load text from STRING path
BD Clear Cache Clear cached files by pattern

How Caching Works:

  1. Place a cache node after an expensive operation
  2. First run: generates data, saves to output/BrainDead_Cache/
  3. Subsequent runs: loads from cache, skips upstream generation entirely
  4. Change the seed to force regeneration

Character Nodes (BrainDead/Character)

Advanced tools for maintaining character consistency with Qwen-Image models.

Node Description
BD Qwen Character Edit Enhanced image editing with character preservation
BD Qwen T2I Custom Text-to-image with custom system prompts
BD Qwen Multi-Image Multi-reference image editing
BD Qwen Identity Lock Strong identity preservation with weighted references

Features:

  • Customizable system prompts for character consistency
  • Multi-image support (up to 3 reference images)
  • Per-image weight and role control
  • Identity-focused templates that prioritize facial features

Mesh Nodes (BrainDead/Mesh)

3D mesh processing, color sampling, simplification, and PBR texture baking tools.

Node Description
BD Cache Mesh Cache TRIMESH objects as PLY files
BD Sample Voxelgrid Colors Sample vertex colors from TRELLIS2 voxelgrid
BD Sample Voxelgrid PBR Sample full PBR attributes from voxelgrid
BD Apply Color Field Apply COLOR_FIELD to any mesh (deferred color application)
BD Transfer Vertex Colors BVH-based vertex color transfer between meshes
BD Transfer Colors Pymeshlab Transfer colors using pymeshlab
BD Mesh Repair Repair mesh topology (holes, normals, duplicates)
BD Smart Decimate Edge-preserving decimation with pymeshlab
BD Export Mesh With Colors Export mesh with vertex colors to GLB/PLY/OBJ
BD CuMesh Simplify GPU-accelerated mesh simplification with color preservation
BD UV Unwrap UV unwrap with xatlas (GPU) or Blender Smart UV
BD Planar Grouping Group faces by normal direction with boundary straightening
BD Combine Edge Metadata Combine edge metadata from multiple sources
BD OVoxel Bake All-in-one PBR bake from voxelgrid (simplify + UV + bake)
BD OVoxel Texture Bake Bake-only: takes pre-processed mesh + voxelgrid
BD Mesh To OVoxel Convert textured mesh to VOXELGRID format
BD Export OVoxel Export VOXELGRID to .vxz compressed format
BD Load OVoxel Load VOXELGRID from .vxz + sidecar files
BD Fix Normals Fix face orientation (Python-only, fast)
BD Pack Bundle Pack mesh + textures + colors into MESH_BUNDLE
BD Unpack Bundle Unpack MESH_BUNDLE into individual components
BD Cache Bundle Cache MESH_BUNDLE for fast reload
BD Mesh Inspector Inspect mesh properties (verts, faces, UVs, colors)

OVoxel Baking Pipeline:

[TRELLIS2 Texture] β†’ voxelgrid β†’ [BD OVoxel Bake] β†’ mesh + PBR textures
                                       OR
[TRELLIS2 Texture] β†’ voxelgrid β†’ [BD OVoxel Texture Bake]
                          ↑ mesh β†’ [BD Blender Decimate] β†’ [BD UV Unwrap] β†—

VXZ Caching Pipeline:

[TRELLIS2 Texture] β†’ voxelgrid β†’ [BD Export OVoxel] β†’ saved .vxz + .mesh.npz
                                                            ↓
[BD Load OVoxel] β†’ voxelgrid β†’ [BD OVoxel Bake] β†’ re-bake without regenerating

Blender Nodes (BrainDead/Blender)

Advanced mesh processing using Blender's geometry tools (requires Blender 5.0+).

Node Description
BD Blender Decimate Full-featured decimation with edge preservation
BD Blender Edge Marking Detect and mark edges from colors/angles
BD Blender Merge Planes Merge geometry within marked regions
BD Blender Remesh Voxel/quad remeshing with Blender
BD Blender Cleanup Advanced mesh cleanup and repair
BD Blender Vertex Colors Vertex color operations (bake, transfer)
BD Blender Normals Normal fixing and recalculation
BD Blender Export Mesh Export MESH_BUNDLE as GLB with material + vertex colors

Hard Edge Preservation Pipeline:

[Input Mesh]
    ↓
[BD Planar Grouping] (straighten_boundaries=True)
    ↓ Clean geometric boundaries
[BD Blender Edge Marking] (FROM_COLORS_AND_ANGLE)
    ↓ Mark SHARP/SEAM edges
[BD Blender Merge Planes] (delimit_sharp=True)
    ↓ Dissolve while respecting marks
[Low-poly mesh with hard edges intact]

BD Blender Edge Marking Operations:

  • FROM_COLORS: Mark edges where vertex colors differ
  • FROM_ANGLE: Mark edges by dihedral angle threshold
  • FROM_COLORS_AND_ANGLE: Combine both methods
  • CLEAR: Remove existing edge marks

BD Blender Merge Planes Features:

  • Delimit options: Respect SHARP, SEAM, MATERIAL, NORMAL edges
  • Dissolve angle: Control coplanar face merging threshold
  • Region subdivision: Proportional face density based on area
  • Output topology: TRI, QUAD, or NGON output

Prompt Nodes (BrainDead/Prompt)

Iterate through multiple prompts with automatic filename generation.

Node Description
BD Prompt Iterator Basic prompt cycling with filename generation
BD Prompt Iterator (Advanced) Templates, suffix lists, seed modes, ping-pong
BD Prompt Iterator (Dynamic) Up to 20 connected prompt inputs

Modes:

  • sequential: Cycle through prompts in order
  • manual: Select specific prompt by index
  • random: Shuffle prompts randomly
  • single: Always use first prompt

Filename Modes:

  • auto_index: base_000, base_001, etc.
  • suffix_list: base_front, base_left, etc.
  • template: {base}_{index:03d}_{suffix}

Installation

ComfyUI Manager

Search for "BrainDead" in ComfyUI Manager and install.

Manual Installation

cd ComfyUI/custom_nodes
git clone https://github.com/BizaNator/ComfyUI-BrainDead

Dependencies

Most dependencies are included with ComfyUI. Optional:

# For audio caching
pip install torchaudio

# For mesh caching
pip install trimesh

Usage Examples

Cache Expensive Generation

[Expensive Node] β†’ [BD Cache Image] β†’ [Next Node]
                     seed: 42

First run generates and caches. Subsequent runs skip generation.

Character Sheet Workflow

[BD Prompt Iterator (Advanced)]
  prompts: "front view\nleft profile\nright profile\nback view"
  suffixes: "_front\n_left\n_right\n_back"
  base_filename: "character"
  ↓
[BD Qwen Character Edit]
  ↓
[BD Save File]
  name_prefix: "MyCharacter"

Multi-Reference Character Edit

[Load Image 1 (identity)] ─┐
[Load Image 2 (style)]    ─┼→ [BD Qwen Identity Lock] β†’ [Generate]
[Load Image 3 (pose)]     β”€β”˜     image1_strength: 1.5
                                  image1_role: character

Directory Structure

output/
β”œβ”€β”€ BrainDead_Cache/     # Cache nodes save here (clearable)
β”‚   β”œβ”€β”€ cached_image_abc123.png
β”‚   β”œβ”€β”€ cached_mesh_def456.ply
β”‚   └── MyProject/       # Subdirectories supported via name_prefix
β”‚       └── step1_xyz789.png
└── saved_file.png       # BD Save File saves to main output/

Node Categories

BrainDead/
β”œβ”€β”€ Cache/       # Caching and file I/O nodes
β”œβ”€β”€ Mesh/        # 3D mesh processing and color tools
β”œβ”€β”€ Blender/     # Blender-based mesh operations
β”œβ”€β”€ TRELLIS2/    # TRELLIS2-specific caching
β”œβ”€β”€ Character/   # Qwen-Image character consistency
└── Prompt/      # Prompt iteration tools

Tips

Caching Best Practices

  • Use descriptive cache_name values: "trellis_base_mesh", "character_face_gen"
  • Use name_prefix for project organization: "Project1/Step1"
  • Connect workflow seed to cache seed for automatic invalidation
  • Use force_refresh to regenerate without changing seed

Character Consistency

  • Always use the highest quality reference image for image1
  • Set image1_role to "character" and highest strength
  • Use secondary images only for style/pose reference
  • The Identity Lock node is optimized for face preservation

Prompt Iteration

  • Use suffix_list mode for clean filenames: char_front, char_left
  • Connect seed output to sampler for different seeds per prompt
  • Use workflow_id to maintain separate iteration states

🧠 BrainDeadGuild

Professional AI Tools for Creative Production

Created by BizaNator

BrainDeadGuild.com | BrainDead.TV | GitHub | discord

Other BrainDead ComfyUI Nodes

  • BD - Image Descriptor (Coming Soon)
  • BD - Prompt Iterator Enhanced (Coming Soon)
  • BD - Character Consistency Suite (Coming Soon)

Building tools for the BrainDeadGuild community


A Biloxi Studios Inc. Production

Β© 2024 Biloxi Studios Inc. - All Rights Reserved

Support

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors