Generation Parameters
Generation Parameters
- LATENT
- SAMPLER
- SCHEDULER
- width
- height
- steps
- cfg
- sampler_name
- scheduler
- seed
If you've ever changed the CFG on your KSampler and forgotten to update the number you typed into a separate text node for your saved metadata, this node is the fix. Generation Parameters is TW-CUI-Util's "set it once" hub: one node holds your resolution, steps, CFG, sampler, scheduler, and seed, and it outputs every one of those values twice - once correctly typed for wiring into the nodes that actually do the work, and once as plain strings/numbers for wiring into a metadata-aware save node like this pack's own Save Image (Advanced). Set the number in one place, and every downstream consumer of it - sampler and saved file alike - is guaranteed to agree.
How it works. This is mostly a bundling exercise: it holds seven values (width, height, steps, cfg, sampler, scheduler, seed) as required widgets, builds an empty latent tensor sized to your chosen width/height - the same job Empty Latent Image does, though note there's no batch_size knob here, so you're fixed at a batch of one - and fans everything back out as ten separate outputs. The sampler and scheduler dropdowns are the full ComfyUI-standard sets: 34 samplers (euler, the dpmpp family, res_multistep, uni_pc, and everything in between) and 9 schedulers (normal, karras, exponential, beta, and the rest), which strongly suggests it's pulling those lists live from ComfyUI's own sampler registry rather than hardcoding them - meaning as ComfyUI core adds new samplers, this node's dropdown grows with it for free.
Inputs and outputs that matter. Required: image_width / image_height (default 1024x1024, step 8 - SDXL's native square, unsurprisingly, given this is the same pack that ships Common SDXL Resolutions), sampling_steps (default 25), cfg (default 8, range 0-20), sampler_name and scheduler_name as dropdowns, and seed (default -1, meaning random - same convention as everywhere else in ComfyUI). On the output side: LATENT for wiring into your KSampler's latent_image input; SAMPLER and SCHEDULER as properly typed combo outputs for the KSampler's own sampler_name/scheduler inputs; and then the same seven values again as plain width, height, steps, cfg (FLOAT), sampler_name (STRING), scheduler (STRING), and seed - ready to feed straight into Save Image (Advanced)'s matching optional inputs.
Installing it. Part of TW-CUI-Util. ComfyUI Manager: search "TW-CUI-Util", install, restart. Or manually, git clone https://github.com/TW-CUI/TW-CUI-Util into ComfyUI/custom_nodes and restart. Nothing else to fetch - the node needs no models of its own.
Troubleshooting.
- The CFG default here is 8, a reasonable SDXL/SD1.5-era starting point (5-9 is the community's usual sweet spot for that generation of checkpoints) - but if you're pointing this node at a newer flow-matching model like Flux or Z-Image instead, don't trust the default blindly. Those architectures often want CFG at or near 1, and cranking it to 8 on a guidance-distilled model will burn your image rather than improve prompt adherence.
- Same caution applies to sampler/scheduler choice: DPM++ 2M Karras is the safe default for SDXL, but Karras specifically is known to hurt rather than help on flow-matching models. If output suddenly looks worse after switching checkpoints to something newer, check whether this node's sampler/scheduler settings also need to change, since it won't warn you.
- Seed at -1 means "pick something random each run" - expected behavior, not a bug. If you're trying to reproduce a specific image you liked, you need the actual seed value (visible in your saved metadata if you routed it through Save Image (Advanced)), not -1.
- Because this node's LATENT output replaces Empty Latent Image, forgetting to disconnect a separate Empty Latent Image node elsewhere in the same graph is an easy way to end up with two different resolutions fighting for the same KSampler slot. If your output size looks wrong, confirm you're actually feeding the sampler from this node's
LATENToutput and not a stray one left over from an earlier version of the workflow.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| image_width | INT | 10248–16384 | — |
| image_height | INT | 10248–16384 | — |
| sampling_steps | INT | 251–100 | — |
| cfg | FLOAT | 8.000–20 | — |
| sampler_name | COMBO | 34 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +28 | |
| scheduler_name | COMBO | 9 options: normal, karras, exponential, sgm_uniform, simple, ddim_uniform, +3 | |
| seed | INT | -1-1–18446744073709550000 | — |
Outputs (10)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |
| SAMPLER | euler,euler_cfg_pp,euler_ancestral,euler_ancestral_cfg_pp,heun,heunpp2,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_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,ddim,uni_pc,uni_pc_bh2 | — |
| SCHEDULER | normal,karras,exponential,sgm_uniform,simple,ddim_uniform,beta,linear_quadratic,kl_optimal | — |
| width | INT | — |
| height | INT | — |
| steps | INT | — |
| cfg | FLOAT | — |
| sampler_name | STRING | — |
| scheduler | STRING | — |
| seed | INT | — |