AIHub Expose Sampler
Expose the sampler dropdown to your client, without the WebUI headaches
- SAMPLER
AIHub Expose Sampler is how an external AIHub client gets to choose the sampler for your workflow. It's technically a string, but a string with a very specific vocabulary: the node ships with a dropdown of ComfyUI's sampler names - euler, euler_ancestral, heun, dpm_2, lms, the newer euler_cfg_pp / euler_ancestral_cfg_pp guidance-prediction variants, exp_heun_2_x0, and a long tail past the first thirteen. Its SAMPLER output plugs straight into a KSampler's sampler input.
The mechanism is the pack's standard one: an AIHub client (an editor plugin speaking the protocol over the websocket on port 8111) sends the chosen value when it runs the workflow, and the node passes it through to your sampler. In the bare web UI it just sits on its default - there's no client to feed it.
The inputs that matter
- value - the default sampler. The dropdown's the guide; if you leave this to the client, set a sane default so a first run without an override still samples like you intended.
- unaffected_by_model_sampler - the interesting one. AIHub has a whole "model defaults" system: an exported model config carries a
default_sampler(plus cfg, steps, scheduler), and the pack will swap those in automatically when the user picks a model via anAIHubExposeModel. Check this box and your exposed sampler stops inheriting the model's default and always uses what the client explicitly sends. Set it when your workflow's quality is tied to a specific sampler no matter what model is loaded. - advanced - tuck it under the advanced panel in the client UI; there's a case for this since sampler choice is a power-user thing.
- id / label / tooltip / index - the standard protocol plumbing (unique id, display label, hover text, sort order).
The WebUI warning worth reading twice
The README calls out a genuine trap: "differences on how the different nodes treat SAMPLER values can cause issues within WebUI but not during actual execution." Different custom-node ecosystems spell or handle samplers differently in their UI layer, so don't be surprised if a sampler name looks odd inside a web UI panel - what matters is that the value that reaches the sampler during a real AIHub run is the correct ComfyUI name. If something misbehaves, that's the first place to look: a stale value that isn't one of the accepted names.
Install & gotchas
Pack install is unchanged: ComfyUI Manager → search ComfyUI-aihub-workflow-exposer, or:
cd ComfyUI/custom_nodes
git clone https://github.com/otavanopisto/ComfyUI-aihub-workflow-exposer
then restart. No requirements.txt, no model files - it uses only what ComfyUI bundles. Standard AIHub folders and a workflow controller with a unique id still apply.
Practical advice: if your workflow works well with euler_ancestral or dpm_2 on most models, make that the default value and leave unaffected_by_model_sampler off, so an exported model with its own default sampler can do its thing. Enable the "unaffected" flag only when a specific sampler is load-bearing. And remember this node is a selector - if you want the model's own defaults to drive everything, you don't need a sampler expose at all.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| id | STRING | sampler | A unique custom id for this workflow. |
| label | STRING | Sampler | This is the label that will appear in the field. |
| tooltip | STRING | An optional tooltip | |
| value | COMBO | Choose the sampler to use | |
| advanced | BOOLEAN | false | If set to true, this option will be hidden under advanced options for this workflow. |
| index | INT | 0 | This value is used for sorting the input fields when displaying; lower values will appear first. |
| unaffected_by_model_sampler | BOOLEAN | false | If set to true, this sampler value will not be affected by the model's default sampler |
Outputs (1)
| 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 | — |