NO8D Ref Tile Attach
Twelve lines of code, and the whole workflow depends on them
- positive
- reference_latent
- positive
This is the least photogenic node in the pack and the one most worth understanding. It takes a conditioning and a latent and gives you back a conditioning. No image, no sampler, no widgets - it has exactly two sockets. And yet if you delete it from the graph, the reference-matched upscale stops being reference-matched.
Here's why.
The problem it solves
MiniMax H3 Image is a reference-driven model: it will redraw your tile guided by a reference image and a prompt. ComfyUI's official route into that is the MiniMaxH3ImageConditioning node, which takes your reference images and, on the way through, does its own reference encoding and rescaling. Convenient. Also exactly what you don't want here, because the whole point of this workflow is that you decided how big the reference is.
So NO8D Ref Tile Attach goes around the front door. It writes a reference latent directly into the conditioning's metadata, at the size you already prepared and encoded, so the official node's automatic scaling path doesn't get a vote.
What it actually does
Under the hood it's a call into ComfyUI's own node_helpers.conditioning_set_values, which sets a minimax_refs key on the conditioning dictionary - a list containing one entry of kind image, with latent_h and latent_w read off the latent tensor's last two dimensions and the latent itself. Then the whole conditioning is walked and detached to CPU before it's returned.
That CPU move is not superstition. A conditioning that quietly holds a VRAM-resident latent is the kind of thing that makes a 20-tile batch die on tile nineteen with a confusing allocation error. Copying it off the GPU keeps the conditioning cheap to shuttle around while the sampler does the expensive part.
If you've ever poked at how reference latents get threaded through ComfyUI models, this is the same pattern Krea 2 and Flux reference paths use - stash the latent in the conditioning, let the model's attention find it. Same idea, different key name. Nothing exotic, just plumbing that's normally hidden inside a fancier node.
The two sockets
positive is a conditioning - in this workflow, the output of the H3 conditioning node, the thing carrying your text prompt and the prepared reference. reference_latent is the latent you got from encoding the same prepared reference through VAEEncode with the H3 Image VAE. Out comes positive, the same conditioning plus the reference.
That's it. Wire it like this, and note that the output fans out twice:
NO8D Ref Tile Prepare.reference ──┬─→ MiniMaxH3ImageConditioning.images.image_0
└─→ VAEEncode.pixels
└─→ NO8D Ref Tile Attach.reference_latent
MiniMaxH3ImageConditioning (conditioning out) ─→ NO8D Ref Tile Attach.positive
NO8D Ref Tile Attach.positive ──┬─→ KSampler.positive
└─→ ConditioningZeroOut ─→ KSampler.negative
The negative branch is the boring half and it's easy to get wrong: H3 Images runs at CFG 1 in this setup, so the negative is a zeroed-out copy of the already-attached positive conditioning. If the reference is in the positive and not in the negative, you've kept the two branches consistent, which is what you want - a mismatch there is one of those failures that produces plausible-looking garbage rather than an error.
Install
Nothing special, it's one file in the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/no8d/ComfyUI-NO8D-controls.git
Manager install works the same way - search the pack title. Restart after. The pack's requirements.txt (json-repair, openpyxl, rembg[cpu]) is for other nodes entirely; this one needs nothing beyond what ComfyUI already imports, because it uses ComfyUI's own node_helpers module at call time. It sits in the NO8D/H3 category, which is a long scroll away from the prompt-library nodes the README documents.
Common issues
The conditioning has to be the right one. Attach takes whatever conditioning you hand it. Give it a CLIP-encoded prompt from a completely different model family and you'll get no error - just a sampler that ignores your reference. The only conditioning this is meant for comes out of the H3 image conditioning node.
Order matters more than usual. Anything that rebuilds the conditioning downstream of this node will drop minimax_refs on the floor. If your tiles come back as generic upscales of the prompt rather than of the picture, the first thing to check is what sits between Attach and the sampler.
Latent size is not free. The node reports the latent's own latent_h / latent_w and passes it through untouched. There's no rescaling here by design - which is the feature, but it also means a latent encoded from the wrong image (say, the whole downscaled reference instead of the per-tile one) will be accepted without complaint. If tiles look like a collage of the entire source rather than a redraw of their own patch, you fed it the wrong VAEEncode.
And the licence thing. H3's open weights exclude the US, EU, UK and Korea from their applicable territory, so whether you should be running this model locally at all is a separate question from whether the node works. It works. See the MiniMax H3 model notes before you plan a product around it.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| positive | CONDITIONING | — | |
| reference_latent | LATENT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| positive | CONDITIONING | — |