LLPS KSampler
A KSampler that writes every step to disk while it runs — no more staring at a black box
- model
- positive
- negative
- latent_image
- llps_config
- latent
LLPS KSampler is a drop-in replacement for ComfyUI's stock KSampler that shows a live preview and optionally saves a frame from every step of the denoising run. "LLPS" stands for Live Latent Previewer & Saver, and that's exactly the pitch: you wire it in where you'd normally put a KSampler, and instead of waiting on a progress bar you watch the image assemble - and if you want, walk away with a frame-by-frame log of the whole generation on disk.
The stock KSampler's preview behavior is tied to ComfyUI's single global live-preview method, and it can't save intermediate frames to disk at all. This node decouples the two. It pairs with LLPS Config from the same pack, which supplies the preview/save policy through a dedicated LLPS_CONFIG socket. Important: this v1 pack does not override every sampler in your workflow - only nodes of this class follow LLPS settings. If you expected a global takeover, that's intentional, a deliberate trade to avoid the monkeypatch/race-condition mess some other packs get into.
The inputs that matter
The sampler side is stock KSampler through and through: model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise. If you know how to use a KSampler, you know how to use this. Same sampler list (euler, euler_ancestral, dpm_2, lms, and the rest), same nine schedulers, same denoise semantics for img2img. The two things that are new:
llps_config- required, and you feed it the bundle fromLLPS Config. No config node, no previews.node_label(optional) - just a name tag. It's used as a per-node subfolder so multiple LLPS samplers in one workflow don't dump frames into the same directory, and it lands in your saved filenames. Leave it at the default unless you have several samplers and want to tell their output apart.
The only output is latent, so it drops into any downstream node (VAE decode, latent-to-image, whatever) exactly where the stock KSampler sat.
How it works
Under the hood it calls ComfyUI's own comfy.sample.sample() - same sampling math, so results are identical to the built-in KSampler at the same settings. What's added is a callback that runs after each denoising step: it decodes the current x0 (the model's clean-image estimate, not the noised latent) into a preview image, pushes it to the progress bar so you see it live, and optionally writes it to disk. Files land in ComfyUI/output/LLPS/<node_label>/ by default, named like LLPS_LLPS_KSampler_seed-12345_step-0007-of-0020_taesd.jpg. With save_metadata_json on, a metadata.json sits next to them recording seed, steps, cfg, sampler, scheduler and the file list - genuinely handy when you're diffing runs. The code is careful about two things: it skips saving step 0 (can be a stale warm-up frame, notably with TAESD) and force-saves the final step at the end, so your last frame is never missing. And it temporarily swaps the global preview method only while building the previewer, then restores it - that's why it doesn't leak into your other samplers.
Install
The pack is ComfyUI-LLPS. Through ComfyUI Manager, search "LLPS" and install; or:
cd ComfyUI/custom_nodes
git clone https://github.com/nicarinai/ComfyUI-LLPS
Restart, then add LLPS Config + LLPS KSampler, connect llps_config to llps_config, and swap the KSampler. No extra models or dependencies - it reuses ComfyUI's built-in TAESD/latent2rgb previewers, so there's nothing to download.
Gotchas
The classic mistake is live_preview_method = none combined with save_preview = true - nothing gets saved because no preview frame is ever decoded. Use latent2rgb or taesd for save-only setups. Also, don't expect to capture previews from your other (non-LLPS) samplers; this pack is scoped to its own node, and stock samplers keep using ComfyUI's global preview setting. If you're a beginner, the one knob worth tuning is save_every_n_steps - at 1 you'll generate 20+ files per 20-step run, which is usually way more than you wanted. And the moment you switch models, check your cfg and scheduler defaults: LLPS KSampler inherits the stock KSampler's defaults (cfg 8, simple scheduler), which are fine for SD1.5/SDXL but rarely right for flow-matching models like Flux.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| seed | INT | 00–18446744073709550000 | — |
| steps | INT | 201–10000 | — |
| cfg | FLOAT | 8.00–100 | — |
| sampler_name | COMBO | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 | |
| scheduler | COMBO | 9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3 | |
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| latent_image | LATENT | — | |
| denoise | FLOAT | 1.000–1 | — |
| llps_config | LLPS_CONFIG | — | |
| node_labelopt | STRING | LLPS_KSampler | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | — |