Nodes/XB_ToolBox/XB-BOX - 自定义采样器(原版优化)
ComfyUI Node

XB-BOX - 自定义采样器(原版优化)

A sampler that does exactly what it says, plus a VRAM shovel

By wjluoxiao·Created 5 months ago·Updated 6 days ago· 302
XB-BOX - 自定义采样器(原版优化)
  • model
  • positive
  • negative
  • sampler
  • sigmas
  • latent_image
  • LATENT
  • LATENT
add_noisetrue
noise_seed0
cfg8.0
cleanup不做任何清理

Here's a refreshing change of pace from this pack: XB_SamplerCustom is a node whose behavior is exactly what its name says. It's ComfyUI's stock SamplerCustom - the "bring your own sampler and schedule" sampler - wrapped in a thin shell that adds one thing: a cleanup dropdown that clears VRAM before sampling. No custom kernels, no hidden magic, no renamed parameters. The pack's own docstring brags about calling the official node "verbatim," and it means it.

This is the current-name version. If you've seen XB_ROCmSamplerCustom floating around, that's the same node under a legacy alias the pack keeps registered so old AMD-era workflows don't break. Same inputs, same outputs, same behavior. When you find one of these in a template workflow, you're looking at the same thing.

Why you'd use the custom sampler at all

A regular KSampler bundles sampler + scheduler + steps into one widget. SamplerCustom unbundles them: you feed it a SAMPLER object from SamplerSelect and a SIGMAS schedule from BasicScheduler, and you can wire combinations that a dropdown can't express - like switching schedulers halfway, or feeding in a custom sigma schedule from a node like SplitSigmas. It also takes positive, negative, latent_image, and the add_noise / noise_seed / cfg trio just like the built-in sampler.

The cleanup option is the pack's four-level memory ladder, and the honest advice is to leave it on the default ("no cleanup") until you hit a problem. If you're running a video model on a small card and a run dies with OOM partway through the schedule, bump it up: first to the single cache cleanup, then to "unload models to system RAM," then the nuclear option that also runs a full gc.collect(). It's a crude valve, but it works, and it costs nothing when the setting is off.

Outputs and wiring

Two LATENT outputs. output is your final latent - into a VAE Decode it goes. denoised_output is the latent before the last noise-removal step; it's for the advanced "finish the tail of a run with a different sampler" trick. Beginner? Wire output, ignore denoised_output.

Install

The usual pack install, nothing node-specific:

cd ComfyUI/custom_nodes
git clone https://github.com/wjluoxiao/XB_ToolBox.git

Restart ComfyUI, and it'll be under "XB_ToolBox/原版优化". Or use ComfyUI Manager and search XB_ToolBox. Two notes: this node needs no extra pip packages (the pack's "no dependencies" README claim is actually true for the wrapper family), and it only registers when comfy_extras.nodes_custom_sampler is importable - which means current ComfyUI only. On an old enough install it silently won't appear.

The honest take: you don't need this node, because ComfyUI ships the original. But if you're already in XB_ToolBox land and you want the same sampler with a VRAM shovel attached, it's free, it's faithful, and it won't surprise you.

CategoryXB_ToolBox/原版优化

Inputs (10)

NameTypeDefaultDescription
modelMODEL
add_noiseBOOLEANtrue
noise_seedINT00–18446744073709550000
cfgFLOAT8.00–100
positiveCONDITIONING
negativeCONDITIONING
samplerSAMPLER
sigmasSIGMAS
latent_imageLATENT
cleanupCOMBO不做任何清理4 options: 不做任何清理, 单次缓存清理, 卸载显存模型, 卸载全量模型

Outputs (2)

NameTypeDescription
LATENTLATENT
LATENTLATENT