Nodes/ComfyUI-ZML-Image/ZML_K采样器
ComfyUI Node

ZML_K采样器

A KSampler with live preview and A1111-style metadata built in

By zml-w·Created about a year ago·Updated 2 months ago· 218
ZML_K采样器
  • 模型
  • 正面条件
  • 负面条件
  • Latent
  • VAE
  • 脚本
  • LATENT
  • 图像
  • 生成信息
种子-1
步数20
CFG8.00
采样器
调度器
降噪1.00
预览方式auto
噪波模式cpu
视频预览disable
视频预览帧率8

At first glance ZML_KSampler (ZML_K采样器) is just the stock KSampler with a different hat on - same model, seed, steps, CFG, sampler, scheduler, conditioning, latent. But the pack's sampler family was built to fix two specific annoyances, and both are worth understanding before you decide whether it's for you: it previews as it samples, and it hands your save node clean A1111-style generation metadata.

It's from ComfyUI-ZML-Image, zml-w's 160+ node pack. The README is candid about the lineage: the samplers borrow the random-seed and preview approach from the efficiency nodes, GPU noise from smZNodes, and video dynamic preview from VideoHelperSuite. This one sits in the pack's "sampler related" subcategory.

How it works

Under the hood it runs the same ComfyUI sampling path as the stock KSampler - it wraps the core comfy.samplers machinery, and you get the full 44 samplers / 9 schedulers list. What's added on top:

  • 预览方式 (preview mode) - auto / latent2rgb / taesd / none. This is the live preview during sampling, so you watch the image form instead of staring at a progress bar. auto picks a sensible decode for your setup; taesd needs the small TAESD decoder (fast, rough); latent2rgb is the cheapest rough preview.
  • 噪波模式 (noise mode) - cpu or gpu. GPU mode switches to GPU-side noise generation (the smZNodes-style nv noise) which can be meaningfully faster on big cards, at the cost of a slightly different noise source (so same seed ≠ same image between modes).
  • 视频预览 (video preview) - enables the VideoHelperSuite-style progressive frame preview, with 视频预览帧率 to throttle it. Turn it on if you're sampling latents batch-by-batch (video) and want to watch frames accumulate.

The two outputs that matter

  • 图像 (IMAGE) - a real decoded image, if you connect a VAE. No VAE, and you get a 1×1 placeholder; this node deliberately refuses to guess your VAE for you. Wire a VAE loader in and the sampler decodes its own output, so you don't need a separate VAEDecode node.
  • 生成信息 (STRING) - the A1111-style parameter string (prompt, steps, sampler, CFG, seed, size, model name) that the pack's save-image node reads to write proper metadata. This is the "the workflow lives in the file" ecosystem working as intended - you share the PNG, the settings travel with it.

The LATENT output is the sampler's actual latent, for img2img chaining or further passes. The 脚本 (script) input accepts the pack's ZML_SCRIPT nodes - its dynamic-CFG, extra-noise, and sharpen/blur script nodes insert mid-sampling adjustments.

Installing it

Pack install:

cd ComfyUI/custom_nodes
git clone https://github.com/zml-w/ComfyUI-ZML-Image

restart ComfyUI, or ComfyUI Manager → search "ComfyUI-ZML-Image". No model downloads for the sampler itself - the TAESD preview path pulls a small decoder model on first use.

Where people get caught

Two things. First, no VAE = a 1×1 black placeholder on the 图像 output, not an error - connect a VAE. Second, the seed semantics: -1 is random, and the pack inherits the efficiency-style seed handling where the displayed seed updates after the run. If you're matching an exact result, lock the seed before rerunning.

When you'd actually reach for it

If you live inside this pack, this is the sampler to use - the preview, the decoded output, and the metadata all wire into its save/CLIP nodes with zero friction. If you're not using the pack, the stock KSampler plus a Preview Image node does the same job with fewer moving parts. It's a cohesive sampler, not a better one.

Categoryimage/ZML_图像/采样器相关

Inputs (16)

NameTypeDefaultDescription
模型MODEL
种子INT-1
步数INT20
CFGFLOAT8.00
采样器COMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
调度器COMBO9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
正面条件CONDITIONING
负面条件CONDITIONING
LatentLATENT
降噪FLOAT1.000–1降噪强度,1.0表示完全降噪,0.0表示不降噪
预览方式COMBOauto4 options: auto, latent2rgb, taesd, none
噪波模式COMBOcpu2 options: cpu, gpu
视频预览COMBOdisable2 options: enable, disable
VAEoptVAE
视频预览帧率optINT81–30
脚本optZML_SCRIPT添加额外的参数

Outputs (3)

NameTypeDescription
LATENTLATENT
图像IMAGE
生成信息STRING