ComfyUI-BrainDead Introduction
ComfyUI-BrainDead is a collection of custom nodes for building creative workflows in ComfyUI. The author developed it for character, story, 3D, audio, and game-asset production. Its nodes appear in the ComfyUI node browser under 🧠BrainDead, with categories for tasks such as caching, character editing, segmentation, mesh processing, and depth estimation.
The extension is most useful when a project has several connected steps. You might generate a character, separate their clothing into editable layers, turn an image into a 3D mesh, prepare textures, and save each result with a consistent name. BrainDead provides nodes that help those steps work together instead of requiring you to manage every intermediate file or repeat an expensive generation.
You do not need to use the entire collection. Start with a workflow template that resembles your goal, then keep the nodes you need. Templates are available in ComfyUI under Workflow → Browse Templates → ComfyUI-BrainDead and have names beginning with BD-.
How ComfyUI-BrainDead Works
A ComfyUI workflow is a chain of connected steps. Each node receives something, such as an image, mask, prompt, or 3D mesh, and passes its result to the next node. BrainDead adds specialized steps to those chains:
- Reuse a result: Put a cache node after a slow generation step. On the first run, the step produces a result that is saved. On a later run with a valid cache, the workflow loads that result and skips the upstream generation. Change the cache seed or use
force_refreshwhen you want a new result. - Keep assets organized: A save context acts like a reusable naming pattern. Define a project, character, and version once; connected save nodes can use that information to name outputs such as
character_v03_albedoandcharacter_v03_normal. - Separate an image into parts: Segmentation nodes make masks that identify regions such as clothing or facial features. Parts nodes can turn those masks into individual images or layers for editing and export.
- Carry a 3D asset through production: Mesh nodes can simplify geometry, repair it, prepare UVs, bake textures, preview the result, and export it. A mesh is the shape of a 3D object; UVs describe where a 2D texture sits on its surface.
- Make game-ready textures: PBR workflows produce maps describing an object's color, surface direction, roughness, and metallic appearance. Packed maps combine information into image channels for use in an engine.
Some workflows use distinct mesh formats. BrainDead's TRIMESH can carry geometry together with details such as vertex colors, UVs, and materials. ComfyUI's native MESH does not carry those same details. Use BD Trimesh → MESH or BD MESH → Trimesh when connecting the two kinds of nodes, and keep the asset as TRIMESH when preserving its colors and textures matters.
ComfyUI-BrainDead Features
Reuse results and save files
The Cache nodes handle images, masks, latents, audio, strings, meshes, and other data. For example, place BD Cache Image after a slow character render so you can adjust later steps without generating that render again. BD Clear Cache removes cached files by pattern when you no longer want to reuse them.
BD Save Context defines shared filename variables and a template. BD Save File saves an individual result; BD Bulk Save saves several labeled results in one run. For a set of PBR maps, labels such as albedo, normal, and roughness make the files easier to identify. BD Get Context Path supplies a resolved path to another save node, including ComfyUI's built-in Save Image node. Load nodes are also provided for images, meshes, audio, and text.
Keep characters consistent and explore prompts
The Character nodes build on Qwen-Image workflows. BD Qwen Character Edit focuses on preserving a character during an edit, while BD Qwen Identity Lock emphasizes identity across references. You can use up to three reference images, with roles and strengths that distinguish, for example, the main character reference from a pose or style reference. BD Qwen T2I Custom supports custom system prompts, and BD Qwen Multi-Image uses multiple image references.
Character consistency workflow
The Prompt nodes help you compare variations. A prompt iterator can cycle through views such as front, side, and back and create corresponding filenames. Available modes include sequential, manual, random, and single-prompt selection. Advanced options include templates, suffix lists, seed modes, and ping-pong iteration. Use BD For Each Run when each item needs its own downstream edit or upscale; use BD Bulk Save when the results are already made and only need saving.
Separate characters and refine masks
A mask marks which pixels belong to a subject or part. BD SAM3 Multi-Prompt accepts multiple text descriptions and produces masks for them in one workflow step. Its positive and negative prompts, voting modes, color filters, and silhouette controls help distinguish regions that might otherwise overlap.
BD Parts Refine can merge overlapping descriptions, such as “shoe” and “sneaker,” before BD Parts Builder turns the selected regions into a parts bundle. BD Parts Batch Edit (Qwen) can redraw each part or inpaint enclosed gaps. BD Parts Underpaint fills the area revealed when a part is removed. For instance, removing a jacket may require the workflow to create a plausible surface behind it. BD Parts Compose rebuilds a combined image, and BD Parts Export can save individual PNGs, a composite, and a layered PSD.
The Parts Builder 2 workflow takes a different approach for heads: it uses a voted list of items and Qwen Image 2.1 to make visible and complete layers, featureless head plates, and an assembled layer stack. Its vocabulary, plates, and assemble nodes serve different stages of that process.
Face-focused nodes use MediaPipe landmarks, optionally with SAM3 refinement, to locate features such as eyes, brows, lips, and skin. BD Face Socket Infill prepares areas behind features for 2D animation textures. BD MP Mouth Parts separates an isolated mouth render into lips, teeth, and tongue for a packed viseme atlas.
Prepare images and textures
Image utilities cover channel packing, masks, lighting, and layout:
- BD Derive PBR Maps derives albedo, normal, roughness, metallic, ambient occlusion, and packed maps from an image and supporting inputs such as depth. These maps are inferred from the supplied imagery; review them before using them as final materials.
- BD Pack Channels puts image or mask data into red, green, blue, and alpha channels. BD Mask Flatten composites transparency onto a chosen background and offers edge padding to reduce visible texture seams.
- BD Atlas Pack places images into a grid or strip and outputs layout information for each cell. This is useful for sprite sheets and animation frames.
- BD Crop and Center moves a cropped part onto a fixed canvas while maintaining a shared placement point, helping separate parts line up when recombined.
- BD Luma Stats, BD Center Median Luma, BD Normalize Luma, and BD Depth To Shadow Map provide controls for brightness and shading. Mask cleanup, color fill, rectangle, and ellipse nodes support additional preparation work.
Create and finish 3D assets
Pixal3D nodes prepare a source image and generate a mesh plus voxelgrid data that can feed a PBR bake. CubePart nodes separate a mesh into named components, such as a vehicle body and wheels, for individual preview or processing.
The Mesh and Blender categories cover repair, simplification, remeshing, edge handling, UV unwrapping, color transfer, orientation, preview, and export. BD OVoxel Bake combines mesh preparation and PBR texture baking from a voxelgrid; BD OVoxel Texture Bake bakes textures onto a mesh you have already prepared. BD Mesh Preview (Thumbnails) makes a labeled contact sheet or turnaround, while BD Preview 3D provides an interactive view. Export options include colored or textured meshes, and Blender-based GLB or FBX export.
A typical path is:
Source image → Pixal3D → mesh and voxelgrid
↓
simplify and UV unwrap
↓
OVoxel PBR bake
↓
preview and export
Estimate depth and surface direction
BD Lotus-2 Model Loader loads the components needed for Lotus-2 depth or normal prediction. BD Lotus-2 Predict then outputs a map, normalized raw result, and color preview from an image. A depth map estimates which image regions are nearer or farther away; a normal map describes the apparent direction of surfaces. Both can guide later shading, segmentation, or texture work.
ComfyUI-BrainDead Models
BrainDead is a node collection, not one model. The model or backend you use depends on the workflow:
| Model or backend | Role in the extension | When to consider it |
|---|---|---|
| Qwen-Image / Qwen Image Edit | Character editing, identity-focused workflows, and part-by-part redraws | When you need alternate views or editable character parts |
| Qwen Image 2.1 | Parts Builder 2 head-layer and plate workflows | When preparing the supported head-layer pipeline |
| SAM3 | Text-guided segmentation and guided face masks | When you need masks for named objects or facial regions |
| MediaPipe FaceLandmarker | Facial landmarks used to position feature masks | When preparing precise face regions or socket textures |
| Pixal3D | Image-to-3D generation | When starting a 3D asset from a source image |
| MoGe-2 | Automatic camera field-of-view estimation in Pixal3D preprocessing | When the Pixal3D workflow needs camera estimation |
| Roblox CubePart with Qwen3-VL-4B-Instruct | Named-part decomposition of a 3D mesh | When you need separate, aligned meshes for parts you describe |
| Lotus-2 with a FLUX.1-dev base | Depth or normal prediction, depending on the selected Lotus-2 component | When a workflow needs estimated scene geometry |
| FASHN or ATR human parsers | Clothing and human-region parse maps | Mainly for photographic people; the original documentation notes limitations for stylized art |
Some models are obtained on first use. Pixal3D's model weights are approximately 10 GB. CubePart can automatically obtain its model and text encoder when needed; its node also provides an auto_download setting and path overrides. SAM3 nodes described here can load their checkpoint within the node. A first run may therefore take longer than later runs.
Commercial-use caution: The original documentation identifies CubePart code as MIT-licensed but its model weights and parent repository as subject to a research-only license. Review the applicable model terms before using CubePart in a commercial production.
ComfyUI-BrainDead Workflow Templates
The templates in example_workflows/ provide starting points with thumbnails and in-canvas notes. Browse for BD- templates in Workflow → Browse Templates → ComfyUI-BrainDead.
| Goal | Template | What it demonstrates |
|---|---|---|
| Generate a 3D asset from an image | Pixal3D Image to 3D Pixal3D Image to 3D | Image preparation, camera estimation, mesh generation, and PBR baking |
| Split a mesh into named components | CubePart Part Decomposition CubePart Part Decomposition | Named parts, individual meshes, preview, and export |
| Separate image elements for editing | SAM3 Parts Segmentation SAM3 Parts Segmentation | Multiple masks, part refinement, edits, and PSD export |
| Prepare character layers | BD Parts Builder 2 BD Parts Builder 2 | Head layers, featureless plates, and an assembled stack |
| Maintain an identity across views | Character Consistency Character Consistency | Reference-guided Qwen editing and prompt iteration |
| Prepare face regions | Face Segmentation Face Segmentation | MediaPipe and SAM3 masks for facial anatomy |
| Produce texture maps | Image to Full PBR Image → Full PBR | Background removal, depth and normal estimation, and derived material maps |
| Make a sprite or texture sheet | Atlas / Flipbook Atlas / Flipbook | Frames arranged into a grid or strip with per-cell layout data |
| Prepare an engine export | TRELLIS2 to Unreal FBX TRELLIS2 → Unreal FBX | A textured, lower-poly mesh and FBX export |
Other supplied templates cover Lotus-2 depth and normals, GLSL skin tinting, OVoxel baking, TRELLIS2 texturing, FaceWrap, background removal, channel operations, mask tools, game-engine packing, and mesh-to-engine preparation. Choose the closest example, then inspect its in-canvas note and connected inputs before changing settings.
Troubleshooting ComfyUI-BrainDead
An edited workflow keeps showing an old result
- Find the cache node after the generation step.
- Check whether you intended to reuse its saved result.
- Change its
seedor enableforce_refreshto regenerate. - If you need to remove stored results, use BD Clear Cache with an appropriate pattern.
A valid cache deliberately skips the earlier work, so changing a prompt upstream may not produce a new image until the cache is refreshed.
A 3D node will not accept a mesh connection
- Check whether the output says
TRIMESHand the next input expects nativeMESH, or vice versa. - Insert BD Trimesh → MESH or BD MESH → Trimesh in the appropriate direction.
- If you need to retain UVs, materials, or vertex colors, keep the remainder of that workflow in
TRIMESHwhere possible.
A mesh looks white or loses texture detail after export
- Inspect it with BD Mesh Inspector or a preview node to check whether it has UVs, colors, or a material.
- Confirm that the desired diffuse and normal maps are connected where the export node accepts them.
- Check whether the mesh passed through a native
MESHconversion, which cannot carry the same color and UV details asTRIMESH. - Preview the exported asset in your target application before treating it as final.
Part masks overlap or a character has too many similar layers
- Review the descriptions supplied to BD SAM3 Multi-Prompt for near-duplicates.
- Place BD Parts Refine before BD Parts Builder.
- Adjust its overlap threshold or merge behavior, then inspect the debug overlay or resulting labels.
- Confirm the remaining parts before running a slower part-edit workflow.
A part edit has a visible edge or halo
- Check the mask around the affected part.
- In BD Parts Underpaint, increase
mask_dilate_pixelswhen the old edge remains visible; the documentation suggests 64–128 as a range to try for stubborn halos. - Compare the edited part and the reconstructed background at the size you plan to export.
A first model run takes much longer than expected
Some workflows obtain model weights on first use, including Pixal3D, CubePart, and the standalone SAM3 nodes described above. Allow time for the initial download and model loading. If a run reports that a model cannot be found, check the relevant node's model selection, download setting, and any path override before rerunning.
Frequently asked questions
Do I need every node in the pack?
No. The categories and templates let you use only the nodes relevant to your project.
Should I use BD Bulk Save or BD For Each Run?
Use BD Bulk Save to save several already-produced results in one run. Use BD For Each Run when each item must separately pass through further processing, such as an edit or upscale.
Can I use the extension for 2D work without making a 3D model?
Yes. Character editing, prompt iteration, masking, layered parts, caching, and image-saving workflows can be used independently of the 3D nodes.
Are derived PBR maps the same as measured material properties?
No. BD Derive PBR Maps estimates maps from the provided images and supporting inputs. Inspect and adjust the results for your intended look.
Why might a human parser struggle with stylized artwork?
The original documentation notes that the included human-parser backends were trained on photos. For stylized characters, try the text-guided SAM3 and guided face-mask workflows and review the masks visually.
Learn More about ComfyUI-BrainDead
- Browse the supplied example workflows to see how nodes connect in complete creative tasks.
- Open the node collection when you need to identify a particular BrainDead node or category.
- Consult ComfyUI's custom-node documentation for background on the ComfyUI V3 API used by this extension.
The templates are the most direct place to learn as an artist: open one that matches your goal, run it with suitable inputs, then change one setting at a time and compare the results.
