Nodes/ComfyUI-Shinsplat/KSampler (Shinsplat)
ComfyUI Node

KSampler (Shinsplat)

Model tweaks from a control dictionary

By Shinsplat·Created 2 years ago·Updated about a year ago· 47
KSampler (Shinsplat)
  • model
  • positive
  • negative
  • latent_image
  • LATENT
seed0
steps20
cfg8.0
sampler_name
scheduler
denoise1.00
control_

On its face this is a stock KSampler with the serial numbers filed off - same model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise, same LATENT output. The one difference is the optional control_ string input, and understanding that port is the entire reason this node exists in the pack. The source is upfront that it's copied from ComfyUI's own nodes.py "for no real need except to prevent a user from modifying their internal model structure without the forethought to use the proper node to fix it after the generation."

How it works

The sampling path is the stock one - prepare noise from the seed, run comfy.sample.sample with your sampler/scheduler/cfg, return the latent. The twist: if control_ carries a string, it's parsed as a Python dictionary and used to hijack the model before sampling (via the pack's functions.py model patcher), then the model is restored afterwards. In other words, it lets you apply temporary model modifications for a single sampling pass - the kind of thing the pack's token/Tensor Toys pipeline produces - without permanently patching your checkpoint. No control_, and it's indistinguishable from the core KSampler, which is exactly what you want from a drop-in.

The inputs and outputs

The nine standard KSampler inputs you already know, plus:

  • control_ - optional multiline string, expected to be a Python-dictionary-formatted set of model adjustments. Leave empty for stock behavior.

Output: LATENT, wired to a VAE Decode like any other sampler.

How to install it

Part of ComfyUI-Shinsplat:

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

or ComfyUI Manager → "ComfyUI-Shinsplat" → restart. No extra deps.

Common issues

  • "It's just KSampler" - yes, and that's fine. If you don't use the pack's token pipeline, you don't need it; the stock sampler is equivalent. Reach for this one only when you want control_ model tweaks or a single place to see both mechanisms.
  • control_ broke my output - the dictionary format is the pack's own (the same structure Tensor Toys/Clip Tokens Encode emit). Hand-writing it from scratch is a fast way to get a malformed patch; generate it from the pipeline instead.
  • Model restored after run? - by design; that's the point of the node. If you need a persistent patch, use a real model-patching node, not this one.
Categoryadvanced/shinsplat

Inputs (11)

NameTypeDefaultDescription
modelMODEL
seedINT00–18446744073709550000
stepsINT201–10000
cfgFLOAT8.00–100
sampler_nameCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
schedulerCOMBO9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
positiveCONDITIONING
negativeCONDITIONING
latent_imageLATENT
denoiseFLOAT1.000–1
control_optSTRING

Outputs (1)

NameTypeDescription
LATENTLATENT