Nodes/ComfyUI-Apt_Preset/basic_Ksampler_full
ComfyUI Node

basic_Ksampler_full

The everything-KSampler for Apt_Preset's context pipeline

By cardenluo·Created 2 years ago·Updated 21 days ago· 309
basic_Ksampler_full
  • context
  • model
  • positive
  • negative
  • latent
  • vae
  • clip
  • latent_image
  • context
  • image
  • model
  • positive
  • negative
  • latent
  • vae
  • clip
seed0
steps-1
cfg0.00
samplerNone
schedulerNone
denoise1.00
image_outputPreview

This is the flagship sampler in cardenluo's Apt_Preset pack - the one built to sit at the end of the "Loader → Controller → Sampler" pipeline the whole pack is organized around. Feed it a RUN_CONTEXT (everything your loader already assembled: model, clip, conditioning, latent, VAE, sampler settings), and it either runs with what the context already carries or lets you override any single piece of it right here. It's the closest thing in this batch to rgthree-comfy's Context pattern, applied specifically to sampling rather than general graph wiring: one wire in carries a bundle of state, and the node both consumes and re-emits it.

How it works

The key mechanic is the steps and cfg defaults. steps defaults to -1 and its tooltip states plainly: "-1 == None" - meaning leave it at -1 and the node pulls the step count from whatever your loader already set in the context, rather than forcing you to redundantly retype it. cfg works the same way with a 0 == None convention. sampler and scheduler default to the literal string "None" for the same reason. This is the node's whole value proposition: it's a full override surface when you need one, and a silent pass-through when you don't.

The inputs and outputs that matter

Required: context (your RUN_CONTEXT), seed, steps, cfg, sampler, scheduler, denoise (0-1, default 1), and image_output - an enum (Hide/Preview/Save/Hide/Save) that lets this node preview or save its result directly, without a separate Preview/Save Image node downstream. Optional overrides cover model, positive, negative, latent, vae, clip, and latent_image - that last one is a raw IMAGE rather than a LATENT, which reads as an alternate img2img entry point: wire a real image in here (alongside vae) instead of a pre-encoded latent, and let the node do the encoding internally. Outputs mirror the inputs back out - context, image, model, positive, negative, latent, vae, clip - so whatever this node ends up using (context defaults or your overrides) flows forward to the next stage already resolved.

Installing it

Search "ComfyUI-Apt_Preset" in ComfyUI Manager, or:

cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git

Run install.bat on Windows (pip install -r requirements.txt on Linux/Mac), restart. This node needs whatever model/VAE your loader already handles - it has no dependencies of its own beyond the base install.

Common issues

The single most common mistake with this node is not realizing the -1/0/"None" defaults are meaningful - if you type 0 into steps expecting "zero steps" you'll instead get "use the context's value," which can be genuinely confusing if you don't know it's happening. Second: getting your sampler/scheduler pairing wrong for the model architecture you're actually running costs real quality - Karras schedules that help SD 1.5/SDXL actively hurt flow-matching models like Flux or Z-Image, so don't leave sampler/scheduler at "None" blindly assuming your loader's preset already got this right for every model you might swap in.

CategoryApt_Preset/chx_ksample

Inputs (15)

NameTypeDefaultDescription
contextRUN_CONTEXT
seedINT00–18446744073709550000
stepsINT-1-1–10000 -1 == None
cfgFLOAT0.000–100 0 == None
samplerCOMBONone45 options: None, euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, +39
schedulerCOMBONone10 options: None, simple, sgm_uniform, karras, exponential, ddim_uniform, +4
denoiseFLOAT1.000–1
image_outputCOMBOPreview4 options: Hide, Preview, Save, Hide/Save
modeloptMODEL
positiveoptCONDITIONING
negativeoptCONDITIONING
latentoptLATENT
vaeoptVAE
clipoptCLIP
latent_imageoptIMAGE

Outputs (8)

NameTypeDescription
contextRUN_CONTEXT
imageIMAGE
modelMODEL
positiveCONDITIONING
negativeCONDITIONING
latentLATENT
vaeVAE
clipCLIP