Nodes/ComfyUI-Apt_Preset/AD_MinMax_Ref2_generate_refine
ComfyUI Node

AD_MinMax_Ref2_generate_refine

The low-noise detail pass your MiniMax H3 video is missing

By cardenluo·Created 2 years ago·Updated 7 days ago· 337
AD_MinMax_Ref2_generate_refine
  • context
  • stage_info_data2
  • model
  • sigmas
  • refined_latent
  • segment_video
  • merged_video
fps24
seed0
refine_modepixel_refine
refine_modelNone
upscale_output_scale1.00
refine_denoise0.30
latent_model(place MiniMax H3 3D models in models/latent_upscale_models)
latent_scale1.30
low_sigma_start_step2
sampling_profileNone
VAE_TILEdefault
latent_sample_tileNone:不分块

Let's be straight about what this node is before you go hunting for it: AD_MinMax_Ref2_generate_refine is not a standalone sampler you drop into any graph. It's one leg of a specific, multi-stage way of running MiniMax H3 (the open 33B omni-modal video model) inside ComfyUI-Apt_Preset - the "generate a long scene in stages, then refine" workflow the pack's author has been building toward all year. If you found this page, you're probably already running that workflow and wondering what the second half of it actually does.

The two-pass idea

The short version: your first pass (AD_MinMax_Ref2_generate, or the FL2 variant) produces structure - composition, motion, the rough idea. This node takes that finished first-pass latent and runs one more low-noise sampling pass on top of it to put detail back in. It's not a re-roll. The tooltip on refine_mode says it plainly: "Initialize this one low-noise pass from the current first-pass latent." Same seed, same conditioning, far fewer steps, very low denoise. That's the whole trick - you're sharpening, not reimagining.

refine vs latent_scale

Two modes under refine_mode:

  • refine (default) - resamples the first-pass latent at low denoise with a short step count. refine_denoise defaults to 0.3, refine_steps to 8. That's the standard "detail restoration" shape: enough noise to re-draw textures, not enough to change what's happening.
  • latent_scale - for when you also want more resolution, not just more detail. It splits the full sigma schedule at low_sigma_start_step, upscales the first-pass latent by latent_scale (1.3 default, up to 4x) using a MiniMax H3 latent upscaler from models/latent_upscale_models, then samples only the low-sigma tail of the schedule. The high-sigma half already ran in the first pass.

There's also refine_model, an optional image upscaler (models/upscale_models) that takes the decode → upscale → re-encode route instead of working purely in latent space. The author's advice, baked into the tooltip, is to leave it on None or use a 1x model if you're chaining multiple stages - a pixel-space round trip can break the latent continuity that multi-stage generation depends on.

The inputs you'll set

The inputs you'll actually touch day to day: refine_mode, refine_denoise, refine_steps, and (only in latent_scale mode) latent_scale and low_sigma_start_step. The rest is context. motion_context (None / 22 / 39) decides whether the previous stage's refined tail frames are chained into this one for motion continuity - 22 frames is the default and the sane place to start. fps matches your first pass.

Wiring and outputs

Wire-up matters more than sliders here. context must be a RUN_CONTEXT coming off the same stage's first-pass node, and stage_info_data2 is the FLOW_STAGE_INFO carrying the previous stage's refined latent. Skip that and you get a deliberate, readable error - the node checks that stage indices line up, that the data2 channel actually holds a refined latent, and that the model/VAE/audio-VAE are present in context. If you're on stage 1 there's no previous refined segment, and that's fine; if you're on stage 3 and the data2 latent is missing, it raises rather than silently producing a jump cut.

Outputs: refined_latent (a LATENT tagged with the export tail and seed - this is what the next stage consumes, or what goes into your flow's data2 channel), segment_video (just this stage's trimmed clip), and merged_video (the running join so far). The boundary between stages gets repaired and the context-overlap frames trimmed before you ever see the video.

Installing it

Install is the whole-pack route: clone the repo into custom_nodes, double-click install.bat for the dependencies (it's a fat list - pandas, scipy, onnxruntime and friends - and only installs what's missing), restart ComfyUI.

git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git

ComfyUI Manager also finds it if you search "ComfyUI-Apt_Preset". Budget for the H3 model plus its separate video and audio VAE checkpoints plus, if you use latent_scale, an H3 latent upscaler - this node pulls none of those out of thin air. And remember the H3 community licence excludes the US, EU, UK and South Korea from running the local weights; if that's you, none of this runs at all, no matter how well you wire it.

One honest warning: this is the newest, least-tested corner of the pack (the staged-loop nodes landed around September 2026 and the README is CN-first). Expect rough edges. But the idea - separate the expensive structural pass from a cheap low-noise detail pass so you can chain long scenes without blowing VRAM - is sound, and it's the reason people tolerate the setup cost.

CategoryApt_Preset/AD

Inputs (16)

NameTypeDefaultDescription
contextRUN_CONTEXT
fpsFLOAT241–120仅用于视频创建输出
seedINT00–18446744073709550000
refine_modeCOMBOpixel_refinepixel_refine:图像域放大精修;latent_refine:潜空间放大精修。
refine_modelCOMBONoneOptional image upscaler before the second pass. None resamples the first-pass latent directly. Use None or a 1x model for multi-stage latent continuity.
upscale_output_scaleFLOAT1.000.5–1最终倍数 = 当前系数 × 模型倍数
refine_denoiseFLOAT0.300–1Denoise strength for the second sampling pass.
latent_modelCOMBO(place MiniMax H3 3D models in models/latent_upscale_models)1 options: (place MiniMax H3 3D models in models/latent_upscale_models)
latent_scaleFLOAT1.301–4MiniMax H3 latent upscale multiplier between the two sigma ranges.
low_sigma_start_stepINT20–10000Used only without an external SIGMAS input. External SIGMAS are sampled directly without another split.
sampling_profileCOMBONone模型内部QKV/MLP 分块:token分块+层内算子分块
VAE_TILECOMBOdefault只解决VAE 编码、解码阶段的爆显存,不解决主要采样显存
latent_sample_tileCOMBONone:不分块2|128 建议配置,2表示分块数量,128表示重叠数量。分块越小,重叠越小,采样速度越快。
stage_info_data2optFLOW_STAGE_INFO
modeloptMODEL
sigmasoptSIGMASExternal sigmas are sampled directly; low_sigma_start_step is ignored.

Outputs (3)

NameTypeDescription
refined_latentLATENT
segment_videoVIDEO
merged_videoVIDEO