H3 Chain Upscale (experimental)
Upscale the chain, not the clips
- model
- conditioning
- vae
- audio_vae
- soundtrack
- video_path
- video
Everything in this pack exists because H3 makes short clips - four to fifteen seconds per generation in the stock model - so anything longer is a chain. And every chain eventually hits the same wall: you made it at the resolution your card could actually sample, and now you want it bigger.
The obvious move is to upscale each clip and concatenate. Don't. Upscaling clip 3 on its own produces fine detail that clip 2's upscale never invented, so the join you carefully closed at 768p reopens at 1440p - and now the seam is in the sharp part of the picture where it's most visible. Framewise upscalers make different choices every time, which is why tiled video upscales flicker. H3 Chain Upscale handles the chain as one object, one clip per run, and keeps the joins closed.
How it works, roughly
For each clip it reads the low-res latent straight out of the chain folder, upscales it in tiles sized from your free VRAM, and refines it in tiles stepped together - the same noise across the frames two neighbouring clips share, so the overlap doesn't disagree with itself.
Then the part that actually matters. The previous clip's finished upscale of the shared frames is written into this clip's head and locked there with a noise mask of 0. H3 reads mask-0 frames as finished frames, the same way it reads a pinned keyframe, so the refine continues their detail instead of guessing at it - and because the held frames are part of the clip, they cost no extra tokens. With refine off nothing is held and the head is faded in from the previous clip instead, which is the faster, softer, more visible option.
It also decodes straight to disk, so a 4x clip never has to fit in RAM. Each clip after the first is decoded with the previous clip's last latent steps in front of it, then those extra frames are dropped - the H3 video VAE builds each frame from the ones before it, and a cold-start decode comes out brighter for its first frames. That's the flash you see at every join in lower-effort chain upscalers.
And it never joins the movie: line the clips up, then press the movie button once. Each clip's video carries a keyframe exactly where the movie cuts it, so joining is a stream copy and a 4K movie takes seconds. Change codec or CRF and it falls back to the slow route.
What you actually set
The node is one big panel, and the panel is the interface: chain picker at the top, a clip strip with each clip's first frame and a state-coloured border (green done, amber out of date, grey not started), a main button that always does the next thing the chain needs, a player with a marker at every join, and four settings cards. The inputs on the left are wiring; nearly everything you tune is in the panel.
Of the wired inputs: model, conditioning and vae are the ones you can't skip. Give it the plain Reference to Video conditioning, not the Motion Context output, and use H3 Chain Prompt so each clip gets refined with its own prompt. audio_vae is optional and needed only for chain audio. latent_path is the one-wire trick: feed it Save Latent's latent_path and each clip is upscaled right after it's saved, in the same queue, following the Chain node's buttons.
Of the settings, scale (1.5x to 4x, or Custom from 1.1x, snapped to 32 pixels - and identical across the chain), refine, start_noise at 63 and upscale_steps at 4 are the tested configuration. Leave token_budget alone unless you're running out of VRAM; it's the fix for that, and above about 74,898 the INT8 fast kernels crash outright. make_video off makes latents only, which is how you chain two upscale passes for more than 4x.
Outputs: video_path (this clip's video, the movie on a movie run, or the upscaled latent with Video off) and video for nodes that take a VIDEO.
Install
ComfyUI Manager → H3 Motion Context, or:
cd ComfyUI/custom_nodes
git clone https://github.com/NikoDemon80/ComfyUI-H3-Motion-Context
Restart. You need ComfyUI 0.34.0 or newer for the pack as a whole. This node adds two requirements of its own, both real:
- Comfyui-MMH3-UltimateUpscale installed - the node uses its upscaler code.
- A
minimax_h3_latent_upscaler_3d.safetensorscheckpoint inComfyUI/models/latent_upscale_models.
The pack ships no requirements.txt (numpy, PIL and aiohttp come from ComfyUI's environment; PyAV is imported lazily when it writes video). If you had the old ComfyUI-H3-Disk-Upscale pack, remove it. And keep Spectrum off in these graphs - it mispredicts the pinned rows and flattens the audio.
Where people get burned
Memory stacks. One queue loads the base model, the upscaler, then the base model again for the refine, with the upscale's peak on top of the low-res workflow's. Two passes are slower but kinder.
Redoing a clip invalidates the next one, because that clip's head holds the old version's frames. The panel flags it and the main button fixes it. Changing only a Video setting is the friendlier case: it re-encodes without re-upscaling.
Auto-saved latents at index 0 aren't a chain, and it's one chain per output folder - a second chain pointed at the same folder is refused rather than blended.
Refine on, 63 with 4 steps, CRF 16 to 18 for the final movie. That's the config the author tested and the one you should start from.
Inputs (32)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | The H3 model, for the refine. Not used when Refine is off. | |
| conditioning | CONDITIONING | Plain Reference to Video conditioning, the same as the low-res pass. Not the Motion Context output. Use H3 Chain Prompt so each clip gets its own prompt. | |
| vae | VAE | The H3 video VAE. The standard one fits large upscales on small cards. | |
| chain_folder | STRING | h3_context | The chain to upscale: the folder Save Latent wrote to, or another upscale's output folder for a second pass. Never changed. |
| output_folder | STRING | Where the upscale goes, under ComfyUI's output folder. Empty: h3_chain_upscale/<chain name>. One chain per folder. | |
| clip_index | INT | 11–9999 | The clip to upscale. The panel sets this. |
| follow_save_latent | BOOLEAN | true | Only matters with Save Latent wired into latent_path. On: each clip is upscaled right after it is made. Off: making clips upscales nothing; use the panel buttons. |
| pin_length | COMBO | 22 | Only used when the chain did not record it. Set it to the context_length the chain was made with. |
| upscale_model | COMBO | The H3 latent upscaler, from models/latent_upscale_models. | |
| scale | COMBO | 2x | How much bigger. Rounds to the nearest 32 pixels. Every clip in a chain must use the same scale. |
| custom_scale | FLOAT | 2.001.1–4 | The scale when Scale is Custom, 1.1x to 4x. For more than 4x, upscale the upscale in a second pass. |
| refine | BOOLEAN | true | Redraws fine detail after the upscale. Off is faster but softer. |
| sampler_name | COMBO | euler | The sampler the refine uses. |
| start_noise | FLOAT | 635–100 | How much the refine changes the clip, in percent. Lower only sharpens; higher redraws more detail, but faces and small things can change. 63 with 4 steps is the tested setting. |
| upscale_steps | INT | 41–20 | Steps the refine takes. More settles a heavy refine and helps tiles match, but each step is another pass over every tile. |
| make_video | BOOLEAN | true | Off: makes the upscaled latents only, for a second upscale pass to read. No frames, clip videos or movie. |
| sound | COMBO | chain audio | chain audio: the low-res chain's own sound, needs audio_vae. silent: no sound. A wired soundtrack replaces the movie's sound either way. |
| codec | COMBO | H.264 | H.264 plays almost everywhere. H.265 makes smaller files but encodes slower. ProRes makes a large, near lossless .mov for editing software and ignores CRF, Speed and Audio. |
| crf | INT | 140–51 | Picture quality. Lower is better and makes bigger files. 10 to 14 for files you will process further. 16 to 18 for a final movie: it looks the same at a fraction of the size. 23 is a quick draft. Avoid 0: huge files that many players will not play. |
| encoder_speed | COMBO | slow | CPU encoding only. Slower makes smaller files at the same quality. The picture barely changes. |
| audio_kbps | COMBO | 320 | Sound quality. 192 is fine for sharing, 320 is the best. |
| keep_frames | BOOLEAN | true | Keep the PNG frames after the videos are made. Deleting saves disk space, but changing a Video setting later means decoding again. |
| gpu_encode | BOOLEAN | true | Encode on an NVIDIA card when possible. Much faster on big upscales. Falls back to the CPU if it fails. Switching it re-encodes the clips. |
| make_movie | BOOLEAN | false | Set by the panel's movie button for the one run that joins the movie. Leave it off. |
| token_budget | INT | 700004096–1000000 | Advanced. How much the refine works on at once. Higher means fewer, bigger tiles and more VRAM. Above about 74898 INT8 models crash. |
| tile_overlap | INT | 640–1024 | Advanced. How much refine tiles overlap, in pixels. Must be a multiple of 32. |
| min_tile_size | INT | 25664–4096 | Advanced. The smallest refine tile, in pixels. |
| blend_curve | COMBO | smooth | Refine off only. Shape of the fade into the previous clip. smooth eases in and out. |
| geiru_drop_last | COMBO | off | Read from the chain when it records it. Set it by hand only for chains that do not, such as ones made with Roycho's Geiru Context: 17 if the chain used drop_last 17, off otherwise. |
| audio_vaeopt | VAE | The H3 audio VAE. Needed for chain audio. | |
| soundtrackopt | AUDIO | An audio file to use as the movie's sound instead of the chain's. Cut or padded to fit. Clip videos keep their own sound. | |
| latent_pathopt | STRING | To make and upscale clips in one workflow: wire Save Latent's latent_path here. Each clip is then upscaled right after it is saved. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| video_path | STRING | This clip's video, or the movie on a movie run. With Video off, this clip's upscaled latent. |
| video | VIDEO | The same video, for nodes that take VIDEO. Empty with Video off. |