Nodes/ComfyUI Impact Pack/KSamplerProvider
ComfyUI Node Runs on cloud

KSamplerProvider

Package a sampler so a mask node can call it

By ltdrdata·Created 3 years ago·Updated 4 months ago· 3,242
KSamplerProvider
  • basic_pipe
  • scheduler_func_opt
  • KSAMPLER
seed0
steps20
cfg8.00
sampler_name
scheduler
denoise1.00

This node is a wrapper, and understanding why it exists is most of understanding it. Some Impact Pack nodes - TwoSamplersForMask, the upscaler providers - don't run sampling themselves; they orchestrate sampling and need you to hand them a sampler as an ingredient. But a normal ComfyUI KSampler is an all-in-one node that runs immediately; you can't pass "a KSampler" around as an object. KSamplerProvider fixes that. It bundles all the KSampler settings into a reusable KSAMPLER you can plug into those orchestrator nodes. The README puts it simply: "a wrapper that enables KSampler to be used in TwoSamplersForMask."

So you reach for it whenever a TwoSamplersForMask setup asks for a sampler and you want that sampler to be a plain KSampler with your chosen steps, cfg, and scheduler.

How it works

Instead of sampling, it captures a configuration. You set the seed, steps, cfg, sampler, scheduler, and denoise, feed it a basic_pipe (which carries the model and conditioning), and it emits a KSAMPLER object - a sampler-on-a-stick. The orchestrator node then invokes that sampler on whichever region or pass it's managing. Nothing generates here; you're defining a sampler for something else to use.

The inputs that matter

  • basic_pipe - the model/clip/vae/positive/negative bundle the sampler will run with. Required, and the reason this node needs a pipe rather than loose model wires.
  • steps (default 20), cfg (default 8), denoise (default 1) - the usual sampling dials. For a mask region that's blending into an existing base, you'll often lower denoise well below 1.
  • sampler_name and scheduler - the full ComfyUI menus (euler, dpmpp variants, and the rest; simple/karras/exponential and Impact's added AYS schedulers).
  • seed - sampling seed.

There's one optional input, scheduler_func_opt, for supplying a custom scheduler function (the pack's GITS/AYS tooling). Output is a single KSAMPLER - wire it into TwoSamplersForMask's base or mask sampler slot, not into a latent.

How to install it

ComfyUI Manager: search ComfyUI Impact Pack, install, restart. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack, install requirements into ComfyUI's Python (pip install -r requirements.txt, or ..\..\..\python_embeded\python.exe -m pip install -r requirements.txt on Windows portable), restart. Auto-install ended at v7.6. A small SAM model downloads to ComfyUI/models/sams on first run.

Common issues

You wired it expecting an image or latent and got nothing. This node outputs a KSAMPLER, not a sampled result. Its whole job is to be consumed by another node (TwoSamplersForMask and friends). If you just want to sample a latent, use a regular KSampler - this wrapper is only for the mask/upscaler orchestrators.

Scheduler-to-input compatibility errors. If you converted the scheduler widget to an input elsewhere and it won't connect, the README points at the Impact Scheduler Adapter node to bridge that - a known wrinkle from the AYS schedulers being added to the menu.

Need the advanced sampler instead. For RegionalSampler and TwoAdvancedSamplersForMask, the counterpart is KSamplerAdvancedProvider, which exposes start/end step control and a sigma_factor. This basic provider pairs with the non-advanced TwoSamplersForMask.

CategoryImpactPack/Sampler

Inputs (8)

NameTypeDefaultDescription
seedINT00–18446744073709550000Random seed to use for generating CPU noise for sampling.
stepsINT201–10000total sampling steps
cfgFLOAT8.000–100classifier free guidance value
sampler_nameCOMBOsampler
schedulerCOMBOnoise schedule
denoiseFLOAT1.000–1The amount of noise to remove. This amount is the noise added at the start, and the higher it is, the more the input latent will be modified before being returned.
basic_pipeBASIC_PIPEbasic_pipe input for sampling
scheduler_func_optoptSCHEDULER_FUNC[OPTIONAL] Noise schedule generation function. If this is set, the scheduler widget will be ignored.

Outputs (1)

NameTypeDescription
KSAMPLERKSAMPLERsampler wrapper. (Can be used when generating a regional_prompt.)