AUN KSampler 2-Model
Progressive upscaling where the second pass gets its own model
- vae
- model
- positive
- negative
- latent_image
- model_refine
- Base image
- Image upscaled
- Latent upscaled
- Both upscaled
- Refined image
- LATENT
- Upscaled type
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 andModuleNotFoundError: 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.
Inputs (27)
| Name | Type | Default | Description |
|---|---|---|---|
| vae | VAE | VAE model for encoding/decoding between pixel and latent space. | |
| model | MODEL | The diffusion model to use for progressive sampling. | |
| seed | INT | 00–18446744073709550000 | Random seed for reproducible results. Use same seed for identical outputs. |
| steps_total | INT | 302–300 | Total sampling steps across both passes. Split between first and second pass. |
| steps_first | INT | 121–300 | Steps for first pass (base generation). If latent upscale is off, this is used for the single pass. |
| start_step_second | INT | 0-1–300 | Second 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. |
| cfg | FLOAT | 8.00–100 | CFG scale for first pass. Controls prompt adherence in base generation. |
| cfg_latent_upscale | FLOAT | 8.00–100 | CFG scale for latent upscale pass. Can be different from base CFG. |
| sampler_name | COMBO | Sampling algorithm for both passes. DPM++ 2M Karras recommended for progressive sampling. | |
| scheduler | COMBO | Noise schedule. AYS schedulers work well with progressive sampling. | |
| positive | CONDITIONING | Positive prompt conditioning (what you want in the image). | |
| negative | CONDITIONING | Negative prompt conditioning (what you want to avoid). | |
| latent_image | LATENT | Input latent image. For txt2img, use Empty Latent Image. | |
| denoise | FLOAT | 1.000–1 | Denoising strength for first pass. 1.0 = full generation, lower for img2img. |
| latent_upscale | BOOLEAN | true | Enable latent space upscaling between passes. Core feature of progressive sampling. Disabling this will perform a single pass of sampling. |
| upscaling_denoise | FLOAT | 0.610.01–1 | Second 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_method | COMBO | Algorithm for latent upscaling. Bicubic recommended for progressive workflows. | |
| ratio | FLOAT | 1.500.01–8 | Latent upscale ratio between passes. 1.5-2.0 typical for progressive generation. |
| image_upscale | BOOLEAN | false | Enable pixel-space image upscaling. Used to construct 'Both upscaled' and as source for 'Refined image'. |
| image_upscale_method | COMBO | Algorithm for final image upscaling. Lanczos for photos, nearest for pixel art. | |
| image_upscale_model | COMBO | AI upscaling model for final enhancement. 'None' disables AI upscaling. | |
| image_upscale_ratio | FLOAT | 1.500.01–8 | Final image upscale ratio. Can be different from latent upscale ratio. |
| image_upscale_refine | BOOLEAN | false | Output 'Refined image' by re-encoding and sampling the selected source (Both/Image/Base) with the settings below. |
| img_refine_steps | INT | 41–100 | Sampling steps for the final 'Refined image' pass. |
| img_refine_denoise | FLOAT | 0.250–1 | Denoising strength for the final 'Refined image' pass. |
| verbose | BOOLEAN | false | Print detailed pass logs and timings to the console. |
| model_refineopt | MODEL | The model to use for latent space upscaling. (Optional, falls back to base model if not connected.) |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| Base image | IMAGE | — |
| Image upscaled | IMAGE | — |
| Latent upscaled | IMAGE | — |
| Both upscaled | IMAGE | — |
| Refined image | IMAGE | — |
| LATENT | LATENT | — |
| Upscaled type | STRING | — |