Difforum · H3 Refine Guides
Your H3 refine pass dies with a shape mismatch — this is the node that fixes it
- positive
- latent
- vae
- positive
- info
Why this node exists
The Difforum H3 templates render in two stages. H3 generates small - around 640 px, because that is what fits and what the model was tuned for - then the AV latent goes through the Minimax H3 Latent Upscaler (a separate third-party pack, LBH-123-AI/Comfyui_Minimax_h3_latent_Upscaler), doubles, and H3 re-samples a few steps at the new size. That second pass is how you get detail generated by H3 - consistent from frame to frame - instead of a pixel upscaler inventing texture.
The catch is your guides. First frame, last frame, anything you added with Add Guide, or the keyframes Difforum's H3 Guides anchored into the generation: those are encoded at the small size and they don't travel as pixels, they travel inside the conditioning. Feed that same conditioning to the refine pass and it fails with a shape mismatch, because the upscaled latent is twice as wide and tall and the guide latents are not.
So this node is not a creative choice, it's plumbing. You reach for it the moment you tick on the latent-upscale block of an H3 template, and you skip it entirely if you render in one pass.
What it does under the hood
It walks the positive conditioning, finds the guide entries H3 stashed inside it, and for any guide whose latent doesn't match the upscaled latent's spatial grid, it re-encodes that guide at the new size. Where the pixels come from is the interesting part:
- if the guide was added by Difforum's own H3 Guides, the full-size picture is still stashed on the guide - so it re-encodes from the original pixels, no quality lost;
- otherwise it decodes the small guide through the H3 VAE, resizes it to
latent_width * 16 × latent_height * 16(16 px per latent cell is H3's spatial factor), and encodes again. Fine for a first/last frame, slightly softer than a fresh encode.
Encodes are cached by tensor, so ten guides that were all cropped from the same source cost one pass. Guides that already fit the target shape are left alone, and ref2va reference pictures are deliberately untouched - they keep their own size by design.
Inputs and outputs
Only four inputs, all required:
- positive - the same conditioning the first H3 pass used, guides included. Not a fresh MiniMax H3 Reference to Video output, the post-guides one.
- latent - the upscaled AV latent from the H3 Latent Upscaler. The node reads through the nested AV structure, so pass the upscaled latent straight in.
- vae - the MiniMax H3 video VAE. Same one the guides were encoded with.
- mode -
re-encode(default) ordrop guides. Drop guides removes the video guides and lets the refine follow the upscaled render alone, which is the escape hatch when a guide is fighting the render or you don't care about holding it. Guide entries that carry audio survive either way.
Two outputs: positive, wired into the refine pass's positive conditioning slot, and info, a STRING that lists exactly what happened per guide - old latent shape, new shape, and whether it came from pixels or a decode. It's cheap; if a refine looks soft, read that string before you blame the sigmas.
Installing the pack
Difforum itself is an easy install, which is worth saying because most ComfyUI packs aren't:
cd ComfyUI/custom_nodes
git clone https://github.com/chillithebillis/Difforum.git difforum
# restart ComfyUI
Or search Difforum in ComfyUI Manager. Its only declared dependency is numpy, which already ships with ComfyUI; OpenCV is imported lazily and only by the flow/webcam nodes, so there is no pip fight with anything else you have installed. Python 3.10+ required, and it runs fine on 3.12.
The third-party H3 Latent Upscaler is a separate install from the Difforum pack. If the refine block is red, check that one first.
Where people get burned
- Still a shape mismatch. You handed it a latent that isn't the upscaled one, or conditioning from a different pass. The node has to see both halves of the same shot.
- Guides look soft after the refine. That's the decode-and-resize path. Difforum's own guides carry their pixels and stay sharp; guides added by core H3 nodes don't.
- References still mismatch. Correct.
ref2vapictures are intentionally left at their own size - this node only rescales the video guides. - You added it to a single-pass graph. Harmless but pointless; nothing needs rescaling when there's no upscale.
Community signal for this pack is thin - a couple of r/comfyui reposts in June 2026 with no discussion - so the in-pack docs (docs/BRIDGES.md, docs/NODES.md) are your real reference. They're unusually good, and the info output is the fastest way to confirm the fix landed.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| positive | CONDITIONING | The same conditioning the first H3 pass used (with its guides / first-last frames). | |
| latent | LATENT | The upscaled AV latent (after the H3 Latent Upscaler), so the guides match its size. | |
| vae | VAE | MiniMax H3 video VAE. | |
| mode | COMBO | re-encode | re-encode: guides rebuilt at the refine size (from the original pixels when Difforum H3 Guides added them). drop guides: the refine follows the upscaled render alone. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| positive | CONDITIONING | — |
| info | STRING | — |