Nodes/AUN ComfyUI Nodes/AUN KSampler 2-Model
ComfyUI Node

AUN KSampler 2-Model

Progressive upscaling where the second pass gets its own model

By loz2754·Created 8 months ago·Updated about 24 hours ago· 5
AUN KSampler 2-Model
  • vae
  • model
  • positive
  • negative
  • latent_image
  • model_refine
  • Base image
  • Image upscaled
  • Latent upscaled
  • Both upscaled
  • Refined image
  • LATENT
  • Upscaled type
seed0
steps_total30
steps_first12
start_step_second0
cfg8.0
cfg_latent_upscale8.0
sampler_name
scheduler
denoise1.00
latent_upscaletrue
upscaling_denoise0.61
upscale_method
ratio1.50
image_upscalefalse
image_upscale_method
image_upscale_model
image_upscale_ratio1.50
image_upscale_refinefalse
img_refine_steps4
img_refine_denoise0.25
verbosefalse

AUN KSampler 2-Model (AUNKSamplerPlusv4) is the same progressive two-pass sampler as KSampler Plus - base pass, latent upscale, second pass, optional pixel upscale, optional refine - with one addition that changes how you think about it: an optional second model that powers the latent-upscale pass. The idea is real and popular in hi-res-fix circles: generate with a fast or compositional model, then let a detail-oriented model do the second pass. If you've ever hand-built that with two KSamplers and a latent upscale in between, this is the one-node version.

How it works

The mechanics are the v3 chain: first pass → latent upscale (ratio, bicubic recommended) → second pass → Both upscaled via decoded pixel upscale → optional Refined image. The new input is model_refine, an optional MODEL connection. Wire a second model in and the latent-upscale pass uses it instead of the base model; leave it unconnected and the base model handles both passes, so the node degrades gracefully to a plain KSampler Plus. That "optional, falls back safely" behavior is why it's worth using even when you don't yet have a second model - you can wire one in later without restructuring the graph.

All the v3 controls carry over unchanged: steps_total / steps_first, start_step_second, cfg and cfg_latent_upscale (separate CFG per pass), latent_upscale / ratio / upscaling_denoise, the pixel-space image_upscale / image_upscale_method / image_upscale_model / image_upscale_ratio, and image_upscale_refine + img_refine_steps + img_refine_denoise for the optional final pass. Outputs are the same five images plus LATENT and the Upscaled type string for filename honesty.

When the second model actually helps

The community pattern: the base model composes (fast, low-CFG), the refine model adds detail (a detail LoRA'd checkpoint, a realism-tuned model). The tip is to keep the second pass denoise moderate - 0.5–0.7 per the tooltips - and remember that above ~0.6 the second pass starts changing composition, not just refining it. Pairing a distilled/turbo base with a full-quality refiner is the most common successful combo.

Installing it

Same pack, one install:

  • ComfyUI Manager: search "AUN ComfyUI Nodes", install, restart.
  • Manual: cd custom_nodes && git clone https://github.com/loz2754/AUN-ComfyUI-Nodes, then restart. Manual installs and ModuleNotFoundError: cv2? pip install -r custom_nodes/AUN-ComfyUI-Nodes/requirements.txt.

Common issues

Two-model setups multiply the usual tuning surfaces, so the failure mode is usually a mismatch: the second model has its own CFG habits (distilled models want CFG near 1–2, full models want more), and cfg_latent_upscale defaults won't know which you're using. Set it for the refine model, not the base. And if the second pass drifts off-composition, lower upscaling_denoise before changing models - you're more likely fighting denoise than the wrong refiner.

CategoryAUN Nodes/KSampler

Inputs (27)

NameTypeDefaultDescription
vaeVAEVAE model for encoding/decoding between pixel and latent space.
modelMODELThe diffusion model to use for progressive sampling.
seedINT00–18446744073709550000Random seed for reproducible results. Use same seed for identical outputs.
steps_totalINT302–300Total sampling steps across both passes. Split between first and second pass.
steps_firstINT121–300Steps for first pass (base generation). If latent upscale is off, this is used for the single pass.
start_step_secondINT0-1–300Second pass control: -1 uses denoise-fraction (see 'upscaling denoise'), 0 starts at step 0, steps_first continues after pass 1. Both-upscaled mirrors this schedule to reduce drift.
cfgFLOAT8.00–100CFG scale for first pass. Controls prompt adherence in base generation.
cfg_latent_upscaleFLOAT8.00–100CFG scale for latent upscale pass. Can be different from base CFG.
sampler_nameCOMBOSampling algorithm for both passes. DPM++ 2M Karras recommended for progressive sampling.
schedulerCOMBONoise schedule. AYS schedulers work well with progressive sampling.
positiveCONDITIONINGPositive prompt conditioning (what you want in the image).
negativeCONDITIONINGNegative prompt conditioning (what you want to avoid).
latent_imageLATENTInput latent image. For txt2img, use Empty Latent Image.
denoiseFLOAT1.000–1Denoising strength for first pass. 1.0 = full generation, lower for img2img.
latent_upscaleBOOLEANtrueEnable latent space upscaling between passes. Core feature of progressive sampling. Disabling this will perform a single pass of sampling.
upscaling_denoiseFLOAT0.610.01–1Second pass denoise amount. Notes: • Used only when start_step_second = -1 (denoise-fraction mode). • Typical refinement: 0.5–0.7. • Ignored when continuing from a start step.
upscale_methodCOMBOAlgorithm for latent upscaling. Bicubic recommended for progressive workflows.
ratioFLOAT1.500.01–8Latent upscale ratio between passes. 1.5-2.0 typical for progressive generation.
image_upscaleBOOLEANfalseEnable pixel-space image upscaling. Used to construct 'Both upscaled' and as source for 'Refined image'.
image_upscale_methodCOMBOAlgorithm for final image upscaling. Lanczos for photos, nearest for pixel art.
image_upscale_modelCOMBOAI upscaling model for final enhancement. 'None' disables AI upscaling.
image_upscale_ratioFLOAT1.500.01–8Final image upscale ratio. Can be different from latent upscale ratio.
image_upscale_refineBOOLEANfalseOutput 'Refined image' by re-encoding and sampling the selected source (Both/Image/Base) with the settings below.
img_refine_stepsINT41–100Sampling steps for the final 'Refined image' pass.
img_refine_denoiseFLOAT0.250–1Denoising strength for the final 'Refined image' pass.
verboseBOOLEANfalsePrint detailed pass logs and timings to the console.
model_refineoptMODELThe model to use for latent space upscaling. (Optional, falls back to base model if not connected.)

Outputs (7)

NameTypeDescription
Base imageIMAGE
Image upscaledIMAGE
Latent upscaledIMAGE
Both upscaledIMAGE
Refined imageIMAGE
LATENTLATENT
Upscaled typeSTRING