Nodes/comfyui-otacoo/Global Sampler 🔰
ComfyUI Node

Global Sampler 🔰

One knob that steers every sampler in your workflow

By otacoo·Created 7 months ago·Updated 30 days ago· 1
Global Sampler 🔰
      sampler_nameeuler
      schedulernormal

      Ever stared at a workflow with four KSamplers and thought "I just want to try euler instead of dpmpp_2m everywhere"? ComfyUI's stock answer is to click through every node and change the widgets by hand. OtacooGlobalSampler ("Global Sampler 🔰", from the comfyui-otacoo pack) is the answer that doesn't scale to nothing: drop one into the graph, pick a sampler and scheduler, hit Queue, and every node with those widgets follows along.

      It's a frontend trick, and that's fine

      The honest mechanism: the Python node is a no-op - doit() returns nothing, and the node has no outputs. The real work happens in global.js, which hooks ComfyUI's queuePrompt and, just before a run starts, walks every node in the graph and rewrites any widget named sampler_name or scheduler to the global values. That's why it can sit anywhere, unconnected, and still affect the whole workflow - it's not dataflow, it's a queue-time override. It also means the change is real: after you queue, you'll see the individual KSampler widgets visibly change to the global values.

      What you actually set

      Two inputs, both dropdowns, both fed live from ComfyUI's own lists (comfy.samplers.KSampler.SAMPLERS / SCHEDULERS), so you get the full 40-plus samplers and 9 schedulers and they track whatever your ComfyUI ships - no stale hardcoded subset.

      • sampler_name - defaults to euler. That's a sane, boring default and, notably, the flow-matching-safe one: per the KB's sampler wisdom, on Flux and other flow-matching models Karras and exponential schedules fall apart while the Euler family holds up. If your workflow is SD 1.5/SDXL, you'll probably switch this to dpmpp_2m and the scheduler to karras - the classic pair for that family.
      • scheduler - defaults to normal, which suits the euler default and keeps the flow-matching peace.

      The two traps

      First: it stomps differences. If your workflow deliberately uses a different sampler for a first pass versus a refine/upscale pass, this node forces both to the same pair - there's no exclusion list. Second, there was a real bug here: changelog 1.3.2 fixed the node "caching the choices and applying them to every workflow even if not present in the workflow," i.e. old versions could leak the global settings into graphs that didn't even contain the node. If you've had samplers mysteriously changing on you, update the pack.

      It does apply to any node with those widget names, not just KSamplers, so it's a neat little knob for the classic "systematic sweep" workflow the community keeps posting - set the global once, queue a run, change one number, queue again.

      Install

      Same pack as the other three 🔰 nodes:

      cd ComfyUI/custom_nodes
      git clone https://github.com/otacoo/comfyui-otacoo.git
      

      then restart ComfyUI, or via ComfyUI Manager → search otacoo. No dependencies, no downloads. The pack is young and has essentially no community footprint yet, so treat this as a convenience node for personal use - handy, zero-risk, but not battle-tested by thousands of strangers. It's the kind of thing you either use constantly or forget you installed.

      Categoryutils

      Inputs (2)

      NameTypeDefaultDescription
      sampler_nameCOMBOeuler44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
      schedulerCOMBOnormal9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3

      Outputs (0)

      No outputs