ComfyUI Node

AICG-渲染器(二采放大)

Upscale the Latent, Then Repaint It at 0.5

By JGRFW·Created about a month ago·Updated about 13 hours ago· 261
AICG-渲染器(二采放大)
  • pass1
  • sampler
  • sigmas
  • video
  • first_pass_video
◄sampler_name▾►
◄scheduler▾►
◄steps20►
◄second_pass_seed0►
◄second_pass_denoise0.50►
◄tiled_sampling关►
◄tile_width512►
◄tile_height512►
◄tile_overlap128►
◄tile_fade32►
◄sample_preview关►
◄preview_interval1►
◄latent_upscale_model▾►
◄upscale_scale1.20►
◄upscale_devicecuda►
◄upscale_precisionfp16►
◄upscale_chunkingtrue►
◄output_first_pass关►
◄cleanup_after_run卸载模型►

What it's for

First pass gets the composition. Second pass gets the detail. AICG-渲染器(二采放大) (AICG3D_H3RenderPass2) takes the pass1 payload from AICG-渲染器(一采) and runs the expensive half: upscale the video latent, re-sample it at moderate denoise so the model fills in real texture, decode, compose. One input, one VIDEO out.

Six canvas nodes' worth of work - split the combined AV latent, upscale the video half in 3D, concatenate back, rebuild the keyframe conditioning at the new resolution, sample, decode - folded into one box. The audio is not upscaled. It rides through unchanged and gets re-muxed at the end, which is the right call: there's nothing to gain from resampling a stereo track through a spatial upscaler.

How it works

The mechanism is exactly the hi-res fix, adapted to a 24-channel 3D latent. The payload's AV latent gets separated into video and audio. The video half goes through a latent upscaler that only changes the spatial grid - the temporal axis is preserved, so your motion doesn't get smeared or doubled. Then it's concatenated back with the audio latent, and the second sampler runs with second_pass_denoise as the strength.

Because a scaled-up latent no longer matches the resolution the keyframe conditioning was encoded at, the pass also rebuilds that conditioning: start/end frame images get re-encoded through the video VAE at the new size before sampling. That's the same job AICG3D_H3SecondPassConditioning does standing alone.

Settings worth your attention

second_pass_denoise - the dial that decides everything. Default 0.5, tooltip says 0.4–0.6 is the stable band. Below 0.4 you've paid for a second pass and got a slightly softer upscale; above 0.6 the model starts rewriting the shot and can eat the detail the upscaler just invented. Start at 0.5.

upscale_scale - 1.2 by default, 1.0 to 4.0. Note that 1.0 means "no upscale, just re-sample at the same size", which is a legitimate way to use this node as a refinement pass.

latent_upscale_model - your checkpoint from models/latent_upscale_models. Empty folder, empty dropdown, and the node errors rather than guessing.

tiled_sampling - off by default for speed. Turn it on for long clips or big upscales: memory is then bounded by one tile rather than the whole frame, at the cost of being a bit slower. tile_width, tile_height (512 each), tile_overlap (128, bigger means softer seams but must stay under the tile dimensions) and tile_fade (32, the actual blend length inside the overlap) tune that. The general rule from every tiled-upscale guide holds: overlap is what stops patchwork.

upscale_device / upscale_precision - cuda / fp16 by default. Drop to cpu or fp32 when the upscaler itself is what's OOMing.

upscale_chunking - on by default, processes long clips in temporal chunks with overlap. Leave it on for anything past a few seconds.

output_first_pass - off by default. Turn it on and you get a decoded copy of the un-refined latent on first_pass_video for A/B comparison. It costs an extra decode, so it's a debugging tool, not a default.

second_pass_seed is 64-bit and 0 means random each run. sampler_name / scheduler / steps describe the second pass, and the optional sampler / sigmas inputs override them the same way they do everywhere else in this pack.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/JGRFW/comfyui-AICG3D

Or Manager → Registry → AICG3D. Restart and Ctrl+F5. The only entry in requirements.txt is imageio-ffmpeg; the latent upscaler is implemented inside the pack, so you don't need a third repo for it.

You do need to supply the upscaler checkpoint:

ComfyUI/models/latent_upscale_models/

The pack creates the folder on demand. Drop the H3-compatible latent upscaler in it and restart so the dropdown picks it up. Everything else - transformers, text encoder, both VAEs - is the same set the first pass uses.

Traps

No upscaler checkpoint. The dropdown shows a single placeholder entry pointing at models/latent_upscale_models, and the run dies with a message telling you to put a checkpoint there. This is the single most common first attempt.

tile_fade larger than tile_overlap. The fade can't be longer than the overlap it lives in; keep fade ≤ overlap and both under the tile size.

Denoise too high. 0.8 feels like it should give "more detail" and instead replaces the upscaled frames with a fresh render that has different faces. If your second pass changed the shot, this is why.

Feeding it a raw latent. pass1 is a payload type, not a LATENT - the node validates it and tells you to connect the first-pass renderer's output. There's no way to use this node as a standalone upscaler.

VRAM. Longer clips are the usual killer, not resolution. Tiled sampling first, then upscale_chunking, then lower the scale.

CategoryAICG3D/提示词与 Skill

Inputs (22)

NameTypeDefaultDescription
pass1AICG3D_H3_PASS1—
sampler_nameCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
schedulerCOMBO9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
stepsINT201–10000—
second_pass_seedINT00–18446744073709550000二采噪声种子;0 = 每次随机。
second_pass_denoiseFLOAT0.500–1二采重画力度:0.4~0.6 最稳,越大改得越多(放大出来的细节也越容易被改掉)。
tiled_samplingCOMBO关开:二采按空间分块逐块采样再拼回整幅,显存占用只跟单块有关,长片 / 放大后不容易爆显存(比整幅慢一点);关:整幅一次跑完,最快。
tile_widthINT51232–16384二采分块宽度(像素,32 的倍数):越大越快、越吃显存。
tile_heightINT51232–16384二采分块高度(像素,32 的倍数)。
tile_overlapINT12832–16384相邻分块的重叠(像素):越大接缝越淡,必须小于分块宽高。
tile_fadeINT320–16384重叠区里真正做过渡的长度:0 = 硬拼,不能大于重叠。
sample_previewCOMBO关开:二采每一步都把中间结果走 ComfyUI 原生预览通道推给前端,实时采样画面直接显示在这个节点上(右侧图片流面板同样能看到),代价是每步多一次预览解码;关:只留底部那条百分比进度条。
preview_intervalINT11–1000每隔多少步推一张预览图(1 = 每步都推)。调大能省掉预览解码与前端刷新的开销,采样更快、画面刷新更慢;第一步与整段采样的最后一步始终会推一张,方便看开局与成图。
latent_upscale_modelCOMBO1 options: (place models in: /tmp/ComfyUI/models/latent_upscale_models)
upscale_scaleFLOAT1.201–4latent 放大倍数:1.0 = 不放大,只按原分辨率跑二采。
upscale_deviceCOMBOcuda2 options: cuda, cpu
upscale_precisionCOMBOfp163 options: fp16, fp32, bf16
upscale_chunkingBOOLEANtrue长片按时间分块放大并做重叠融合,显存更省;短片可以关掉。
output_first_passCOMBO关开:额外解码一采 latent,从 first_pass_video 输出一份对照成片(更慢、更占显存),方便和二采直接对比。
cleanup_after_runCOMBO卸载模型跑完这个节点后怎么收尾:卸载模型 = 连模型一起卸出显存并回收内存,占用最低,但下次运行要重新加载;释放缓存 = 只把 PyTorch 缓存的显存还给驱动并回收内存,模型留在显存里,下次跑得快;不处理 = 保持 ComfyUI 默认行为。
sampleroptSAMPLER可选外部采样器,例如 DMAD Sampler。连接后覆盖 sampler_name。
sigmasoptSIGMAS可选外部 Sigmas,例如 DMAD Sigmas。连接后覆盖 scheduler、steps 和 denoise 截断。

Outputs (2)

NameTypeDescription
videoVIDEO—
first_pass_videoVIDEO—