Double Sample Parameters
Set your second sampling pass once — and let the recipe travel with the image
- seed
- steps
- cfg
- sampler
- scheduler
- denoise
- parameters_json
Two-pass sampling is one of the highest-value habits in ComfyUI: sample once at low resolution to compose the image, then run a second pass on a cleaned-up latent (or a higher resolution) to add detail. The standard way is to build that second KSampler with hand-placed widgets. This node is the tidy version - a dedicated home for the second pass's sampler settings that also hands you a portable JSON string so the whole recipe can be saved into the image's metadata and reused later.
What it is, in context
It's the sibling of Input Parameters, which does the same job for the first pass. Together they give a double-sampler workflow a single, inspectable place where every generation setting lives: first-pass values from Input Parameters, second-pass values from this node. The README's quick start walks exactly this - 02_double_sampler_workflow wires Input Parameters → KSampler → second KSampler fed by Double Sample Parameters, with the Bypass Switch controlling whether that second pass runs at all.
Inputs that matter
The six you'd expect for a KSampler's second pass:
seed(INT) - defaults to 0, withcontrol_after_generateenabled so it randomizes after each run like a core seed widget.steps(INT, default 20),cfg(FLOAT, default 7.0),denoise(FLOAT, default 1.0) - the usual suspects. For a hires-fix-style second pass you'll often lower denoise well below 1.0.sampler- the full 44-entry ComfyUI sampler list, including the CFG++ (_cfg_pp) and SDE variants.scheduler- the 9 standard schedulers (karras, exponential, ddim_uniform, and friends).
One genuinely nice detail: the sampler and scheduler lists aren't frozen at load time. The node rebuilds them lazily from comfy.samplers.KSampler on access, so if another pack adds a sampler (like RES4LYF's beta samplers), the dropdown and output type stay in sync instead of giving you a "Return type mismatch" error.
Outputs
Six typed wires (seed, steps, cfg, sampler, scheduler, denoise) that plug straight into a KSampler's inputs, plus one star:
parameters_json(STRING) - a compact, self-identifying JSON payload tagged with schemapm4a_double_sample_parameters. The point of the tag: you can concatenate it with Input Parameters'parameters_jsonand feed the combined string into the pack's Image Saver, which picks each schema out of the blob and writes the correct values into the A1111-style metadata. That's how a second-pass recipe survives inside the PNG instead of dying with the workflow.
Installing it
Ships with the pack - install once, get all eight nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/tsukino4a/ComfyUI-4A-Prompt-Manager.git
cd ComfyUI-4A-Prompt-Manager
python install.py # or: pip install -r requirements.txt
Restart ComfyUI after. Or use ComfyUI Manager and search 4A Prompt Manager. The only extra Python dependency in the pack is piexif, and that's only needed by Image Saver for JPEG/WebP - this node runs with zero extra setup.
Troubleshooting
- Wire the named outputs, not the JSON.
parameters_jsonis for the Image Saver's metadata slot, not for KSampler. KSampler wants the individualseed,steps,cfgwires. - "Return type mismatch" after installing another sampler pack. If you see this on the sampler wire, refresh/restart - the lazy type rebuild usually fixes it on the next load.
- Second pass runs but does nothing. Check the Bypass Switch in the workflow - by default this pack's second-pass subgraph starts bypassed until something enables it.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| seed | INT | 00–18446744073709550000 | — |
| steps | INT | 201–10000 | — |
| cfg | FLOAT | 7.00–100 | — |
| sampler | COMBO | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 | |
| scheduler | COMBO | 9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3 | |
| denoise | FLOAT | 1.000–1 | — |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| seed | INT | — |
| steps | INT | — |
| cfg | FLOAT | — |
| sampler | euler,euler_cfg_pp,euler_ancestral,euler_ancestral_cfg_pp,heun,heunpp2,exp_heun_2_x0,exp_heun_2_x0_sde,dpm_2,dpm_2_ancestral,lms,dpm_fast,dpm_adaptive,dpmpp_2s_ancestral,dpmpp_2s_ancestral_cfg_pp,dpmpp_sde,dpmpp_sde_gpu,dpmpp_2m,dpmpp_2m_cfg_pp,dpmpp_2m_sde,dpmpp_2m_sde_gpu,dpmpp_2m_sde_heun,dpmpp_2m_sde_heun_gpu,dpmpp_3m_sde,dpmpp_3m_sde_gpu,ddpm,lcm,ipndm,ipndm_v,deis,res_multistep,res_multistep_cfg_pp,res_multistep_ancestral,res_multistep_ancestral_cfg_pp,gradient_estimation,gradient_estimation_cfg_pp,er_sde,seeds_2,seeds_3,sa_solver,sa_solver_pece,ddim,uni_pc,uni_pc_bh2 | — |
| scheduler | simple,sgm_uniform,karras,exponential,ddim_uniform,beta,normal,linear_quadratic,kl_optimal | — |
| denoise | FLOAT | — |
| parameters_json | STRING | — |