AppendInstanceDiffusionTracking
Merging two InstanceDiffusion tracks into one
- tracking_1
- tracking_2
- tracking
- prompt
InstanceDiffusion, as implemented by logtd's ComfyUI-InstanceDiffusion, drives per-object prompting through bounding boxes and class labels rather than masks. In this pack, CreateInstanceDiffusionTracking builds one of those box-and-prompt entries. This node is the second half: it takes two of those entries and glues them into a single stream your sampler actually consumes.
How it works
The node's own description says plainly what it's for: appending tracking data for InstanceDiffusion. Give it two TRACKING objects - say, one for a head, one for a hand, each built separately with CreateInstanceDiffusionTracking - and it merges them into one combined tracking output, plus a combined prompt string.
The inputs and outputs that matter
tracking_1/tracking_2(TRACKING, required) - the two entries you're merging.- Optional
prompt_1/prompt_2(STRING, default empty) - override strings if you want different prompt text in the merge than what's baked into the tracking objects themselves. - Outputs:
tracking(the merged stream) andprompt(the combined prompt text).
Because it only takes exactly two inputs, controlling more than two subjects means chaining Append nodes - merge instances 1 and 2, feed that result plus instance 3 into another Append node, and so on. That's the standard shape for a two-input combinator in ComfyUI (ComfyUI's own ConditioningCombine works the same way), and it's a reasonable trade for keeping each node's interface simple rather than variable-arity.
How to install it
KJNodes via ComfyUI Manager (search KJNodes for ComfyUI) or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/kijai/ComfyUI-KJNodes
pip install -r ComfyUI-KJNodes/requirements.txt
You also need logtd/ComfyUI-InstanceDiffusion installed for the TRACKING type this node produces to mean anything downstream - this node alone just rearranges data, it doesn't render anything.
Common issues & troubleshooting
This is a niche, dated integration - go in with the right expectations. A quick check of real community discussion turns up a short burst of interest around InstanceDiffusion in early 2024 and basically nothing since. It's a genuine, functioning tool, not an abandoned stub, but you won't find a large active community to troubleshoot against - the linked repos' own code and issues are your best resource if something goes sideways.
Prompts aren't combining the way you expect. Check whether you're relying on the prompt text baked into each tracking input, or overriding with prompt_1/prompt_2 - mixing the two without realizing it is an easy way to end up with a combined prompt that doesn't match what you thought you built.
Trying to control more than two instances and it's not working. This node is strictly a pairwise combinator. You need one Append node per additional instance beyond the first two, chained - there's no single node in this pack that merges an arbitrary number at once.
You don't actually need per-instance box control. InstanceDiffusion is the surgical, fiddly option. If a soft mask per region would do the job, this pack's ConditioningSetMaskAndCombine family gets you regional prompting with far less setup.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| tracking_1 | TRACKING | — | |
| tracking_2 | TRACKING | — | |
| prompt_1opt | STRING | — | |
| prompt_2opt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| tracking | TRACKING | — |
| prompt | STRING | — |