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

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

XB_ROCmSamplerCustom is just ComfyUI's SamplerCustom with a cleanup switch

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

Let's get the awkward thing out of the way first: despite the "ROCm" in its name, this node has nothing AMD-specific about it. Pop the hood and it's a thin wrapper around ComfyUI's own SamplerCustom - same inputs, same outputs, same sampling math. The only real addition is a cleanup dropdown that runs a bit of VRAM housekeeping before sampling starts. That's it. The ROCm prefix is legacy branding from the pack's earlier AMD-focused days, kept alive so old workflows keep loading.

XB_ToolBox calls this family "原版优化" - "vanilla optimized" - and that's an honest description. The pack's own source says it calls the official node "verbatim, zero parameter changes," and just injects a graded memory cleanup in front of it. So if you already know SamplerCustom, you know this node. If you don't, this is the flexible "bring your own schedule" sampler: instead of picking sampler + scheduler inside one box, you feed it a SAMPLER object (from SamplerSelect) and a SIGMAS schedule (from BasicScheduler, KSamplerSelect, or a sigma node) and it runs whatever combination you've wired.

The inputs that matter

The ones you'll actually touch on a beginner workflow:

  • model - the patched model from your loader.
  • positive / negative - your conditioning.
  • sampler and sigmas - the custom pair that's the whole reason to use this over a plain KSampler. Wire a SamplerSelect into sampler and a BasicScheduler into sigmas.
  • latent_image - your starting latent.
  • add_noise / noise_seed / cfg - same meaning as the built-in sampler. cfg defaults to 8, which is a DDPM-era default; on flow-matching models like Z-Image the KB's own advice is that CFG 1 is the real default (guidance baked into the weights), so don't trust the 8 blindly.
  • cleanup - the pack's four-level ladder: no cleanup, single cache cleanup (soft_empty_cache + empty_cache), unload models to system RAM, or unload everything including a full gc.collect(). Default is no cleanup.

The two outputs

output is your finished latent - wire it to a VAE Decode. denoised_output is the latent as it stood one step before the final noise removal; it's for the advanced trick of refining at the end without re-running the whole schedule. Most people never use it.

Install and gotchas

Installing XB_ToolBox: ComfyUI Manager, search XB_ToolBox, install, restart. Or manually:

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

Then restart ComfyUI. Two gotchas worth knowing. First, the README claims "no extra pip dependencies required" - that's true for this node specifically (it's pure ComfyUI core), but the pack ships a lot of other nodes that do need heavy deps like easyocr, onnxruntime, and llama-cpp-python; they fail to register on their own rather than breaking this one. Second, the node only registers when comfy_extras.nodes_custom_sampler is importable - which every modern ComfyUI has. On ancient builds you'll see it missing.

Honest verdict: if you're on a low-VRAM card and you're chaining many heavy steps, the cleanup dropdown is a genuinely handy convenience. Everyone else can treat this as "the familiar SamplerCustom, from a pack that's trying to be your one-stop shop."

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
outputLATENT
denoised_outputLATENT