GU Get Sampler Indexed
Pick a sampler by number so loops can change samplers too
- sampler
- sampler_name
- total
A sampler dropdown is a widget - you pick it with a mouse. GU Get Sampler Indexed turns that dropdown into an index you can drive with a number, which matters the moment you're doing anything loop-shaped. Feed it an integer and it hands you back the sampler at that position in ComfyUI's built-in list, along with the sampler's name and the list length.
The typical ComfyUI sampler widget is a fixed enum: you can't wire a changing value into it from a loop, a batch node, or a randomizer. This node exists to break that wall - the same idea as the GU pack's indexed scheduler picker, but for samplers.
What it does
- s_list - the full list of system samplers (44 of them on a stock install, from
eulerandeuler_ancestralthroughdpmpp_2m_sde,ddim,uni_pcand friends). This is the "which list am I indexing into" reference, and it's pulled live from ComfyUI's sampler registry. - index - which sampler you want, 1 to 44.
- total - read-only display of how many samplers exist; the README calls it "indication only," so don't try to drive anything with it.
Outputs:
- sampler - the sampler reference, typed so it plugs straight into a KSampler's sampler socket.
- sampler_name - the same value as a plain string, for places that want text (filenames, labels).
- total - the list length, as an INT, for loops that need to know the bounds.
Mechanically it's a one-liner: SampList[index-1]. Sampler lists are 1-indexed in the UI, so index 1 is euler, index 44 is uni_pc_bh2 on a default ComfyUI.
Where this gets fun
In a loop - say you're iterating a batch of generations and want to A/B test samplers, or sweep the whole list - you wire the loop counter into index, and each iteration gets a different sampler. Wire total back into your loop's max, and you've made a sampler sweep that automatically covers the entire installed list without you typing a single sampler name. The KB's concepts essay notes the community's standing advice: DPM++ 2M or UniPC for quick seed farming, then explore samplers at various step counts for the keeper - this node is the plumbing that makes that sweep scriptable.
Install
ComfyUI Manager → Custom Nodes Manager → search "GU Nodepack" → Install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/alexguryev/ComfyUI-GU_Nodepack
cd ComfyUI-GU_Nodepack
pip install -r requirements.txt
No models to download; deps are psutil, requests, gu-funclib>=1.9.0. Windows-tested, single-user design, everything else best-effort.
Gotchas
The list is your install's sampler list, which can differ if you have packs that register extra samplers. total tells you the actual count, so trust it over the README's example numbers. And remember the index is 1-based while a lot of loop counters are 0-based - off-by-one here silently gives you a different (but valid) sampler, the sneakiest failure mode in this whole pack. And one heads-up that applies to the whole pack: the README warns that prestartup_script.py monkey-patches the websocket to refresh file lists on browser connect - benign, no extra endpoints, but security scanners will mention it.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| s_list | COMBO | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 | |
| index | INT | 11–44 | — |
| total | STRING | 44 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| 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 | — |
| sampler_name | STRING | — |
| total | INT | — |