ZML_K采样器
A KSampler with live preview and A1111-style metadata built in
- 模型
- 正面条件
- 负面条件
- Latent
- VAE
- 脚本
- LATENT
- 图像
- 生成信息
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.
autopicks a sensible decode for your setup;taesdneeds the small TAESD decoder (fast, rough);latent2rgbis 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.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| 模型 | MODEL | — | |
| 种子 | INT | -1 | — |
| 步数 | INT | 20 | — |
| CFG | FLOAT | 8.00 | — |
| 采样器 | COMBO | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 | |
| 调度器 | COMBO | 9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3 | |
| 正面条件 | CONDITIONING | — | |
| 负面条件 | CONDITIONING | — | |
| Latent | LATENT | — | |
| 降噪 | FLOAT | 1.000–1 | 降噪强度,1.0表示完全降噪,0.0表示不降噪 |
| 预览方式 | COMBO | auto | 4 options: auto, latent2rgb, taesd, none |
| 噪波模式 | COMBO | cpu | 2 options: cpu, gpu |
| 视频预览 | COMBO | disable | 2 options: enable, disable |
| VAEopt | VAE | — | |
| 视频预览帧率opt | INT | 81–30 | — |
| 脚本opt | ZML_SCRIPT | 添加额外的参数 |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |
| 图像 | IMAGE | — |
| 生成信息 | STRING | — |