h4 - Context Hub
Bundle your whole workflow state into one wire
- base_pipe
- model
- vae
- clip
- positive
- negative
- latent
- image
- mask
- any_A
- any_B
- h4_pipe
- model
- vae
- clip
- positive
- negative
- latent
- image
- mask
- any_A
- any_B
H4_ContextHub is the "stop drawing ten wires across the whole graph" node. ComfyUI has a real, well-known wiring problem: a model, a VAE, a CLIP, positive and negative conditioning, a latent, an image, and a mask all need to travel from loaders to the sampler, and if your workflow is big, that's a spider's web. The standard fix - used by rgthree's Context, Efficiency Nodes' pipes, and Easy-Use's pipe dicts - is to bundle everything into one object that travels down one wire, and let each consumer pull off what it needs. ContextHub is h4_Live's version of that idea, and its README calls it "The Mothership" for a reason: everything lands there, gets packed, and ships out on a single h4_pipe.
Where h4's version differs from the others is honest engineering: the pipe types across packs don't interoperate. rgthree's Context isn't an h4 pipe, and h4's pipe isn't an Efficiency pipe. So ContextHub commits you to the h4 ecosystem - which is fine if you're already in it (it pairs naturally with H4_ContextUnpack), just know the lock-in going in.
The inputs
Everything is optional, which is the point - you only plug in what you have:
- base_pipe - pass an existing
h4_pipein here to extend it rather than start fresh. This is how you build a pipe across multiple hubs: load your model in one, add an image in another, keep everything else riding along. - model, vae, clip, positive, negative, latent, image, mask - the standard bundle of types.
- any_A, any_B - wildcard slots for anything else. Need to ride a string, a seed, or some custom object through the pipe? This is where it goes.
The outputs
Eleven outputs, and here's the useful design: the node returns both the full h4_pipe and every individual component (model, vae, clip, positive, negative, latent, image, mask, any_A, any_B). So it's simultaneously a packer and a splitter - the pipe output feeds the rest of the pipeline, and the individual outputs let you keep wiring specific values downstream without unpacking. Whatever was in the pipe, or passed in as an input, comes out the corresponding output.
How it actually behaves
The mechanism is dead simple under the hood: it starts with a fresh dict (or a copy of base_pipe), stuffs in every non-None input, and returns the dict plus each value. It also prints a little console report describing every tensor it sees - shape, device, dtype. That logging is surprisingly useful when you're debugging why a tensor is on the wrong device or has the wrong batch size.
Installing
Standard h4_Live: ComfyUI Manager → search "h4_Live", or git clone https://github.com/m3rr/h4_Live into custom_nodes, restart. No extra dependencies - this is pure Python dict plumbing.
Where people get burned
Two habits to avoid. First, treat it as a bus, not a black box: when a value disappears downstream, the first thing to check is whether it ever made it into the hub, because only non-None inputs get packed. Second, don't expect cross-pack magic - an rgthree Context won't slide into an h4 pipe input and work. If you're mixing packs, the wildcard slots (any_A/any_B) are your only bridge, and even that's a stretch. It's a tidy, opinionated tool for an h4-only graph; it's the wrong tool if your workflow is built on another pack's context system.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| base_pipeopt | H4_PIPE | Optional: Pass an existing pipe here to add to it. | |
| modelopt | MODEL | Add a Model to the pipe. | |
| vaeopt | VAE | Add a VAE to the pipe. | |
| clipopt | CLIP | Add a CLIP to the pipe. | |
| positiveopt | CONDITIONING | Add Positive Conditioning. | |
| negativeopt | CONDITIONING | Add Negative Conditioning. | |
| latentopt | LATENT | Add a Latent. | |
| imageopt | IMAGE | Add an Image. | |
| maskopt | MASK | Add a Mask. | |
| any_Aopt | * | Add anything else (A). | |
| any_Bopt | * | Add anything else (B). |
Outputs (11)
| Name | Type | Description |
|---|---|---|
| h4_pipe | H4_PIPE | — |
| model | MODEL | — |
| vae | VAE | — |
| clip | CLIP | — |
| positive | CONDITIONING | — |
| negative | CONDITIONING | — |
| latent | LATENT | — |
| image | IMAGE | — |
| mask | MASK | — |
| any_A | * | — |
| any_B | * | — |