ComfyUI Node

OC Block Merge

Tidy up your character graph one wire at a time

By Zhuozhuo-219·Created 3 months ago·Updated 2 months ago· 0
OC Block Merge
  • block_a
  • block_b
  • block_c
  • block_d
  • block_e
  • block_f
  • block_g
  • block_h
  • oc_block
  • debug_text

This is the plumbing node of the pack, and it does exactly one thing: takes up to eight OC_BLOCK inputs, wraps them into a single "merge bundle," and hands you one oc_block output you can plug into OC Generator - or into another merge node, because bundles nest.

Why would you bother? Because OC Generator's sockets are dynamic but they still sprawl. Once you're running a face block, a hair block, an accessories block, and a three-slot outfit, the graph gets wide fast. Merging a logical group - say, all the character blocks on one side, all the presentation blocks on another - keeps the wire count down and turns the graph into something you can actually read at a glance. This is the classic legibility problem every ComfyUI graph hits once it outgrows a single screen, and it's the same job a reroute node does for a single wire, just at the bundle level.

What it is and how it works

The node has no required inputs at all - eight optional sockets, block_a through block_h, each typed OC_BLOCK. Connect whatever you've got. At execution it walks the inputs, collects any that are connected, and if one of them is itself a merge bundle it recurses and pulls the inner blocks out flat. So you can merge into groups, then merge the groups, and OC Generator still sees a clean flat list when it flattens everything downstream.

Outputs are the useful pair: oc_block (the bundle, ready for OC Generator or another merge) and debug_text (a one-line summary of how many blocks came from each socket, so you can spot a wire you forgot to connect).

There's no mode, no seed, no option dropdown - nothing to tune. If a socket is empty it's simply skipped, and an all-empty merge emits a "no connected blocks" debug line instead of crashing. That makes it safe to leave in the graph while you're still building.

Installing it

Same drill as the rest of the pack - it's one repo:

cd ComfyUI/custom_nodes
git clone https://github.com/Zhuozhuo-219/ComfyUI-OC-Generator

Restart ComfyUI, or use ComfyUI Manager and search ComfyUI-OC-Generator. Zero PyPI dependencies (the requirements.txt is effectively empty on purpose - it runs on the host ComfyUI runtime) and no models to download. All the tag data ships in-repo.

When to reach for it

Honestly? Only when the graph needs it. If you've got four blocks and a clean layout, skip the merge and connect them straight into OC Generator - one less node to maintain. Where it earns its keep: your workflow has more than one OC Generator (say, a character and a background character), or you're building a character library where you save a "base body" bundle and a "wardrobe" bundle as reusable chunks. Merging gives you a single handle to drag around.

One gotcha worth knowing: because the merge recurses through bundles, it's easy to accidentally double-merge something by wiring a merge output into another merge and into OC Generator. The blocks get included twice - and then dedupe on OC Generator saves you, since it drops the duplicate fragments. That's the design's safety net, and it works.

This is a young, lightly-used pack, so don't expect a huge community consensus on workflow style yet. Keep the debug_text handy, trust the flat output, and use the merge as a tidying tool rather than a requirement.

CategoryOC Generator

Inputs (8)

NameTypeDefaultDescription
block_aoptOC_BLOCKFirst OC block input.
block_boptOC_BLOCKSecond OC block input.
block_coptOC_BLOCKThird OC block input.
block_doptOC_BLOCKFourth OC block input.
block_eoptOC_BLOCKFifth OC block input.
block_foptOC_BLOCKSixth OC block input.
block_goptOC_BLOCKSeventh OC block input.
block_hoptOC_BLOCKEighth OC block input.

Outputs (2)

NameTypeDescription
oc_blockOC_BLOCKMerged OC block bundle. Connect this to OC Generator or another merge node.
debug_textSTRINGReadable summary of which block inputs were merged.